mirror of
https://github.com/evennia/evennia.git
synced 2026-03-25 17:26:32 +01:00
Fixed issue with webclient sessions hanging on disconnect.
This commit is contained in:
parent
93d0db8489
commit
bda5d88c24
2 changed files with 9 additions and 6 deletions
|
|
@ -171,6 +171,13 @@ class WebClient(resource.Resource):
|
|||
suid = request.args.get('suid', ['0'])[0]
|
||||
if suid == '0':
|
||||
self.client_disconnect(suid)
|
||||
else:
|
||||
try:
|
||||
sess = self.sessionhandler.session_from_suid(suid)[0]
|
||||
sess.sessionhandler.disconnect(sess)
|
||||
except IndexError:
|
||||
self.client_disconnect(suid)
|
||||
pass
|
||||
return ''
|
||||
|
||||
def render_POST(self, request):
|
||||
|
|
|
|||
|
|
@ -292,11 +292,7 @@ $(document).ready(function(){
|
|||
});
|
||||
|
||||
// Callback function - called when the browser window resizes
|
||||
$(window).resize(function() {
|
||||
webclient_set_sizes();
|
||||
});
|
||||
$(window).resize(webclient_set_sizes);
|
||||
|
||||
// Callback function - called when page is closed or moved away from.
|
||||
$(window).unload(function() {
|
||||
webclient_close();
|
||||
});
|
||||
$(window).bind("beforeunload", webclient_close);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue