mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
Initialize session_id to -1 so that it will always return something even
if no connections to the daemon have been established
This commit is contained in:
parent
ec410fc1a9
commit
0a86a30c2a
1 changed files with 3 additions and 1 deletions
|
@ -337,6 +337,8 @@ class RPCServer(component.Component):
|
||||||
|
|
||||||
self.factory = Factory()
|
self.factory = Factory()
|
||||||
self.factory.protocol = DelugeRPCProtocol
|
self.factory.protocol = DelugeRPCProtocol
|
||||||
|
self.factory.session_id = -1
|
||||||
|
|
||||||
# Holds the registered methods
|
# Holds the registered methods
|
||||||
self.factory.methods = {}
|
self.factory.methods = {}
|
||||||
# Holds the session_ids and auth levels
|
# Holds the session_ids and auth levels
|
||||||
|
@ -416,7 +418,7 @@ class RPCServer(component.Component):
|
||||||
"""
|
"""
|
||||||
Returns the session id of the current RPC.
|
Returns the session id of the current RPC.
|
||||||
|
|
||||||
:returns: the session id
|
:returns: the session id, this will be -1 if no connections have been made
|
||||||
:rtype: int
|
:rtype: int
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue