[CalendarServer-changes] [9066] CalendarServer/branches/users/glyph/ipv6-client/twext/internet/ adaptendpoint.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Apr 13 11:44:45 PDT 2012


Revision: 9066
          http://trac.macosforge.org/projects/calendarserver/changeset/9066
Author:   glyph at apple.com
Date:     2012-04-13 11:44:45 -0700 (Fri, 13 Apr 2012)
Log Message:
-----------
put the logic closer to the source

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/ipv6-client/twext/internet/adaptendpoint.py

Modified: CalendarServer/branches/users/glyph/ipv6-client/twext/internet/adaptendpoint.py
===================================================================
--- CalendarServer/branches/users/glyph/ipv6-client/twext/internet/adaptendpoint.py	2012-04-13 18:44:40 UTC (rev 9065)
+++ CalendarServer/branches/users/glyph/ipv6-client/twext/internet/adaptendpoint.py	2012-04-13 18:44:45 UTC (rev 9066)
@@ -77,13 +77,11 @@
 
 
     def connect(self):
-        if self.wrapper._outstandingAttempt is not None:
-            raise RuntimeError("connection already in progress")
         self.wrapper.startAttempt()
 
 
     def stopConnecting(self):
-        pass
+        self.wrapper._outstandingAttempt is not None
 
 
     def disconnect(self):
@@ -106,6 +104,8 @@
 
 
     def startAttempt(self):
+        if self.wrapper._outstandingAttempt is not None:
+            raise RuntimeError("connection already in progress")
         self.callStartedConnecting()
         d = self._outstandingAttempt = self.endpoint.connect(self)
         @d.addBoth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120413/b9427c12/attachment.html>


More information about the calendarserver-changes mailing list