Fix #1943 - invalid session id when calling a rpc exported function from a plugin when no client is connected

This commit is contained in:
Andrew Resch 2012-06-10 16:59:49 -07:00
parent 6cb1fd76cc
commit 5dc6dbf216
1 changed files with 1 additions and 1 deletions

View File

@ -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]