Skip to content

"ValueError: signal only works in main thread" when using the server #424

@pcmoritz

Description

@pcmoritz

When using the server together with aiohttp, I'm getting the error

ValueError: signal only works in main thread

from https://github.com/miguelgrinberg/python-socketio/blob/master/socketio/client.py#L28. Can we have the same fix as in miguelgrinberg/python-engineio@6534d32 also for socketio? That would help a lot! At the moment I'm doing this ugly workaround:

        import signal
        origsignal = signal.signal
        signal.signal = lambda x, y: None
        from socketio.asyncio_server import AsyncServer
        signal.signal = origsignal

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions