def on_close(self):
if Options['debug']:
print >> sys.stderr, "DEBUG: WSon_close", getattr(self, 'pathUser', 'NOT OPENED')
try:
if self.eventFlusher:
self.eventFlusher.stop()
self.eventFlusher = None
self._connections[self.pathUser[0]][self.pathUser[1]].remove(self)
if not self._connections[self.pathUser[0]][self.pathUser[1]]:
del self._connections[self.pathUser[0]][self.pathUser[1]]
if not self._connections[self.pathUser[0]]:
del self._connections[self.pathUser[0]]
if self._interactiveSession[0] is self:
# Disable interactivity associated with this connection
self._interactiveSession = (None, None, None, None)
except Exception, err:
pass
评论列表
文章目录