Added session_end event and some docs.
For now, session_end is the same as disconnected, but once support is added later for stream management, the two events will become distinct. Plugins should add handlers for session_end for cleaning any session state.
This commit is contained in:
@@ -389,6 +389,7 @@ class XMLStream(object):
|
||||
self.event('socket_error', serr)
|
||||
finally:
|
||||
#clear your application state
|
||||
self.event('session_end', direct=True)
|
||||
self.event("disconnected", direct=True)
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user