Skip to content

Ctrl-C or SIGINT/SIGHUP signals don't shut down the server immediately #10

@pekkaklarck

Description

@pekkaklarck

When SIGINT or SIGHUP signals are sent to the remote server or Ctrl-C pressed, the server reports that it is shutting down but the process doesn't actually end. The reason is that it is still waiting in handle_request method and exits only after next request comes and that method returns.

This can be fixed by sending an exception from the signal handler to exit handle_request. This exception needs to be caught and silenced to make the exit clean.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions