fix(transport): ignore SIGPIPE during HTTP I/O to survive early server close on large pushes
app.py sets SIGPIPE=SIG_DFL at startup so that piping 'muse log | head' exits cleanly. This same disposition kills the process (exit 141) when the server closes the connection while the client is still uploading a large request body — e.g. a 60+ MB push bundle that triggers a 409 conflict or a 401 auth failure.
Fix: _open_url() now temporarily sets SIGPIPE=SIG_IGN for the duration of the HTTP call via the new _ignore_sigpipe() context manager. Broken- pipe conditions surface as TransportError('Connection reset by peer' or 'Broken pipe') instead of killing the process.
Tests: 3 regression tests in TestSigpipeRegression spin a minimal TCP server that sends a 4xx response after headers and closes immediately, then verify TransportError is raised regardless of SIGPIPE disposition.
0 comments
muse hub commit comment sha256:a34925bfdd33f1794a68ad51c89caa321e39bdea34e0c8cef5aea8e20e1cb28e --body "your comment"
No comments yet. Be the first to start the discussion.