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]
|
suid = request.args.get('suid', ['0'])[0]
|
||||||
if suid == '0':
|
if suid == '0':
|
||||||
self.client_disconnect(suid)
|
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 ''
|
return ''
|
||||||
|
|
||||||
def render_POST(self, request):
|
def render_POST(self, request):
|
||||||
|
|
|
||||||
|
|
@ -292,11 +292,7 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
// Callback function - called when the browser window resizes
|
// Callback function - called when the browser window resizes
|
||||||
$(window).resize(function() {
|
$(window).resize(webclient_set_sizes);
|
||||||
webclient_set_sizes();
|
|
||||||
});
|
|
||||||
|
|
||||||
// Callback function - called when page is closed or moved away from.
|
// Callback function - called when page is closed or moved away from.
|
||||||
$(window).unload(function() {
|
$(window).bind("beforeunload", webclient_close);
|
||||||
webclient_close();
|
|
||||||
});
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue