-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hangs on Connection root #369
Comments
the following code simulates the problem --------------------- example.py ----------------- import os
from tests.rpyc.MyService import MyService
if __name__ == "__main__":
from rpyc.utils.server import ThreadedServer
session_path = '/tmp/session'
if os.path.exists(session_path):
os.remove(session_path)
tserver = ThreadedServer(MyService,
socket_path=session_path,
protocol_config={"allow_all_attrs": True,
"allow_setattr": True,
"allow_pickle": True,
"listener_timeout": None})
tserver.listener.settimeout(0.5)
tserver.start() ------------------------ MyService.py ----------------- import rpyc
class MyService(rpyc.Service):
def on_connect(self, conn):
# code that runs when a connection is created
# (to init the service, if needed)
pass
def on_disconnect(self, conn):
# code that runs after the connection has already closed
# (to finalize the service, if needed)
pass
def exposed_get_answer(self): # this is an exposed method
return 42
exposed_the_real_answer_though = 43 # an exposed attribute
def get_question(self): # while this method is not exposed
return "what is the airspeed velocity of an unladen swallow?" |
Thanks for reporting! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
after updating to version 4.1.3
currently it appears to hang when calling Connection "root" property.
it gets stuck within the wait() function (root >> sync_request >> value >> wait)
it appears that result never arrives
perhaps the _send function is not able to acquire the lock and send the message...
before updating to the new version it worked on version 4.1.2, I have updated to the new version because it solved previous issue #365 (key error)
sample code
Environment
The text was updated successfully, but these errors were encountered: