From 5dc6dbf216f1e02992761d7ad10cc911b5c416e0 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sun, 10 Jun 2012 16:59:49 -0700 Subject: [PATCH] Fix #1943 - invalid session id when calling a rpc exported function from a plugin when no client is connected --- deluge/core/rpcserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/core/rpcserver.py b/deluge/core/rpcserver.py index b9b417e75..b9cfba378 100644 --- a/deluge/core/rpcserver.py +++ b/deluge/core/rpcserver.py @@ -492,7 +492,7 @@ class RPCServer(component.Component): :returns: the auth level :rtype: int """ - if not self.listen: + if not self.listen or not self.is_session_valid(self.get_session_id()): return AUTH_LEVEL_ADMIN return self.factory.authorized_sessions[self.get_session_id()][0]