Commits

Martin Gergov committed 21ea821 Merge

Merged with #72568c2

Comments (0)

Files changed (1)

udt4twisted/udt.py

 from twisted.internet import abstract, error, interfaces
 import udt4 as udt
 from   udt4 import pyudt
+from udt4 import EASYNCRCV, ECONNLOST
 from socket import AI_PASSIVE
 from errno import EWOULDBLOCK, EINTR, EMSGSIZE, ECONNREFUSED, EAGAIN
 import gc
             #Reset socket monitoring
             print ue
             self.reactor._poller.remove_usock(self.socket.UDTSOCKET, self.reactor._POLL_IN)
-            if ue[0] == 6002:
+            #6002
+            if ue[0] == EASYNCRCV:
                 self.reactor._poller.add_usock(self.socket.UDTSOCKET, self.reactor._POLL_IN)
-            if ue[0] == 2001:
+            #2001
+            if ue[0] == ECONNLOST:
                 self.stopListening()
             gc.collect()
             
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.