Describe the bug
When restarting a server rapidly after stopping it, it usually fails with this error:
Traceback (most recent call last):
server = Server()
^^^^^^^^
self.server = ucall.Server(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Server Initialization
Steps to reproduce
Setup a simple server (using Python):
from ucall.rich_posix import Server
server = Server()
@server
def test(name: str) -> str:
return f"Hello, {name}!"
def main():
server.run()
if __name__ == "__main__":
main()
Run it (let's call the file api.py):
In a new shell issue a request to the API:
ucall test name=Louis --uri 0.0.0.0 --port 8545
After the response control+C the server to quit it, then try to restart the server using the same command as above. This fails with the aforementioned error during around 5 to 10 seconds.
Expected behavior
Server restart should not fail.
UCall version
v0.5.4
Operating System
macOS Sonoma 14.5
Hardware architecture
Arm
Which interface are you using?
Official Python bindings
Which implementation are you using?
POSIX
Contact Details
lac.louis5@gmail.com
Is there an existing issue for this?
Code of Conduct
Describe the bug
When restarting a server rapidly after stopping it, it usually fails with this error:
Steps to reproduce
Setup a simple server (using Python):
Run it (let's call the file
api.py):In a new shell issue a request to the API:
ucall test name=Louis --uri 0.0.0.0 --port 8545After the response
control+Cthe server to quit it, then try to restart the server using the same command as above. This fails with the aforementioned error during around 5 to 10 seconds.Expected behavior
Server restart should not fail.
UCall version
v0.5.4
Operating System
macOS Sonoma 14.5
Hardware architecture
Arm
Which interface are you using?
Official Python bindings
Which implementation are you using?
POSIX
Contact Details
lac.louis5@gmail.com
Is there an existing issue for this?
Code of Conduct