Exemple #1
0
 def disconnect(self):
     with self.lock:
         if self.socket:
             socket = self.socket
             self.socket = None
             socket.close()
             self.canvas.fire('DISCONNECT', self)
Exemple #2
0
 def close(self):
     if self._makefile_refs < 1:
         self._sock.shutdown()
         # QQQ wait until shutdown completes?
         socket.close(self)
     else:
         self._makefile_refs -= 1
Exemple #3
0
 def disconnect(self):
     with self.lock:
         if self.socket:
             socket = self.socket
             self.socket = None
             socket.close()
             log.info('Disconnect')
Exemple #4
0
 def process_command(self, client):
     socket, address = client
     try:
         processor = ClientProcessor(socket, address, debug=self.debug)
         processor.read_request()
     except (ValueError, TypeError) as exc:
         logging.error(exc)
     except Exception as exc:
         logging.error(exc)
         socket.close()
Exemple #5
0
 def close(self):
     if self._makefile_refs < 1:
         self._sslobj = None
         socket.close(self)
     else:
         self._makefile_refs -= 1
Exemple #6
0
 def do_close(self, socket, *args):
     socket.close()
Exemple #7
0
 def close(self):
     if self._makefile_refs < 1:
         self._sslobj = None
         socket.close(self)
     else:
         self._makefile_refs -= 1
Exemple #8
0
 def do_close(self, socket, *args):
     socket.close()