Commits

Martin Gergov committed 21ea821 Merge

Merged with #72568c2

  • Participants
  • Parent commits 134429c, 72568c2

Comments (0)

Files changed (1)

File 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()