Skip to content

KeyboardInterrupt ignored on Windows #570

@asmarcz

Description

@asmarcz

Hello,
with the sample below after hitting Ctrl+C, the script exits on Linux but nothing happens on Windows.

Linux
python 3.8.6
python-engineio 3.13.2
python-socketio 4.6.0

Windows
python 3.8.5/3.9.0 neither is working
python-engineio 3.13.2
python-socketio 4.6.0
import socketio

sio = socketio.Client(logger=True, engineio_logger=True)
nspc = "/example"

@sio.event(namespace=nspc)
def connect():
   print("Connected.")

@sio.event(namespace=nspc)
def disconnect():
   print("Disconnected.")

sio.connect("https://example.com", namespaces=[nspc], transports="websocket")
sio.wait()

The connect event handler gets invoked, the PING/PONG starts and I attempt Ctrl+C with no success on Windows.

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions