Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setting SIG_IGN for SIGPIPE errors (mitmproxy#6764)
* Setting SIG_IGN for SIGPIPE errors The issue was reported in mitmproxy#6744 Problem description: When there is a sudden surge of requests, mitmproxy will hit SIGPIPE (broken pipe) errors because it was trying to write to a closed socket. The stacktrace is: File "asyncio/runners.py", line 44, in run File "asyncio/base_events.py", line 636, in run_until_complete File "asyncio/base_events.py", line 603, in run_forever File "asyncio/base_events.py", line 1909, in _run_once File "asyncio/events.py", line 80, in _run File "mitmproxy/proxy/server.py", line 294, in handle_connection File "mitmproxy/proxy/server.py", line 407, in server_event File "asyncio/streams.py", line 325, in write File "asyncio/selector_events.py", line 924, in write When this happens, the process terminates unless handled The fix will allow the process to continue to run. * add changelog entry * [autofix.ci] apply automated fixes * Handling SIGPIPE only in non-Windows platforms * [autofix.ci] apply automated fixes * nit: make check platform-agnostic --------- Co-authored-by: changsin <[email protected]> Co-authored-by: Maximilian Hils <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
- Loading branch information