I'm running a JS socketio client and a Python socketio server. The workflow is roughly client emitting event1 to server -> server reacting to event1, running analysis and emitting event2 to client -> client receives event2 and emits event1 again but with different args -> etc until loop is complete
The problem is that this workflow only works for two iterations, for some reasons after that the server logs show:
received event "event1" from None [/]
None is not connected to namespace /
received event "event1" from None [/]
None is not connected to namespace /
received event "event1" from None [/]
None is not connected to namespace /
received event "event1" from None [/]
I have no idea whatsoever what might be the reason. I've searched through the docs but can't seem to find any parameters that might be responsible for that.
Client:
import { io } from "socket.io-client";
export const socket = io("http://localhost:5550/",
{
timeout: 200000000000
});
socket.emit('event1', args)
socket.on('event2', (msg) => {
...
});
Server:
app = Flask(__name__)
sio = socketio.Server(logger=True, cors_allowed_origins='*')
app.wsgi_app = socketio.WSGIApp(sio, app.wsgi_app)
if __name__ == '__main__':
server = eventlet.wsgi.server(eventlet.listen(('', 5550)), app)
I appreciate any help/tips you can provide, thanks!