From 10d9a349c911825eb36704c92702fbea7eae32d7 Mon Sep 17 00:00:00 2001 From: Teddy Date: Sat, 31 Aug 2013 17:11:35 +0800 Subject: close push tunnel when the password being changed --- server/piztor/server.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'server') diff --git a/server/piztor/server.py b/server/piztor/server.py index d175d99..d9e8bc3 100644 --- a/server/piztor/server.py +++ b/server/piztor/server.py @@ -679,6 +679,13 @@ class ChangePasswordHandler(RequestHandler): uauth.set_password(new_pass) self.session.commit() logger.info("Password changed successfully!") + + pt = RequestHandler.push_tunnels + uid = uauth.uid + pt[uid].close() + del pt[uid] + uauth.regen_token() + return self.pack(struct.pack("!B", _StatusCode.sucess)) -- cgit v1.2.3-70-g09d2