Esempio n. 1
0
	def disconnect(self, *args, **kwargs):
		if "silent" in kwargs:
			del kwargs["silent"]

		if self in _connections:
			_connections.remove(self)
		BaseNamespace.disconnect(self, *args, **kwargs)
Esempio n. 2
0
	def disconnect(self, *args, **kwargs):
		if self in connections:
			connections.remove(self)

		if "dbsession" in self.session and self.session["dbsession"] is not None:
			self.log("Closing leaked session")
			self.session["dbsession"].close()

		# Stupid hack to fix stupid Socket.IO bug.
		if "silent" in kwargs:
			del kwargs["silent"]

		if "room" in self.session:
			self.session["dbsession"] = dbsession = db.Session(db.engine)
			try:
				room = self.get_room()
				room.remove_user(self)
			finally:
				dbsession.close()

		BaseNamespace.disconnect(self, *args, **kwargs)
Esempio n. 3
0
 def disconnect(self, silent):
     self._exit = True
     BaseNamespace.disconnect(self, silent)
Esempio n. 4
0
 def disconnect(self, silent = False):
   if self in self.sockets:
     self.sockets.remove(self)
   BaseNamespace.disconnect(self, silent)
Esempio n. 5
0
 def disconnect(self, silent=False):
     if self in self.sockets:
         self.sockets.remove(self)
     BaseNamespace.disconnect(self, silent)