You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a bug showing only when trying to reopen a server with the same IP (or changing from 0.0.0.0 to 127.0.0.1) and same port settings after a close() function.
The error message is that the port is already in use.
Traceback (most recent call last):
File "/home/hebus/.config/blender/2.80/scripts/addons/MOM/osc.py", line 107, in save_osc_port_in
bpy.ops.mom.refresh_osc()
File "/Graphisme/blender-2.80-linux-glibc217-x86_64/2.80/scripts/modules/bpy/ops.py", line 201, in __call__
ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Traceback (most recent call last):
File "/home/hebus/.config/blender/2.80/scripts/addons/MOM/osc.py", line 140, in execute
osc_server.listen(address=ip, port=port, default=True)
File "/Graphisme/2.80_migration/MOM/oscpy/server.py", line 245, in listen
sock.bind(addr)
OSError: [Errno 98] Address already in use
The solution I found was to introduce a delay using: time.sleep(.01)
10ms was the minimal value to avoid the issue.
The text was updated successfully, but these errors were encountered:
JPfeP
changed the title
Delay between close() and reopening a socket
Delay between close() and reopening a server
Aug 17, 2019
Yes, i've add issues with that as well, tried adding a microsleep (with a much lower value than that), and the CI was still flacky, so for now i rely on retrying when that happens. But indeed it could be a good idea to make stop and stop_all do this directly. We can allow disabling it if people don't plan to reopen on the same port.
Hello,
I had a bug showing only when trying to reopen a server with the same IP (or changing from 0.0.0.0 to 127.0.0.1) and same port settings after a close() function.
The error message is that the port is already in use.
The solution I found was to introduce a delay using:
time.sleep(.01)
10ms was the minimal value to avoid the issue.
The text was updated successfully, but these errors were encountered: