Commit f41b6ab7 authored by Antoine Millet's avatar Antoine Millet
Browse files

Better disconnection handling.

parent d6a7106b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -177,6 +177,7 @@ class ConnectionManager(object):
        '''

        fd = connection.get_fd()
        if fd is not None:
            self._poll.modify(fd, ConnectionManager.MASK_WRITABLE)
        
    def nothing_to_write(self, connection):
@@ -189,6 +190,7 @@ class ConnectionManager(object):
        '''

        fd = connection.get_fd()
        if fd is not None:
            self._poll.modify(fd, ConnectionManager.MASK_NORMAL)
    
    def handle_event(self, fd, event):
+4 −2
Original line number Diff line number Diff line
@@ -428,8 +428,10 @@ class RpcConnection(object):
        
        :return: the file descriptor number of the socket
        '''
        
        try:
            return self._sock.fileno()
        except socket.error:
            return None

    def getpeername(self):
        '''