diff --git a/CHANGELOG.md b/CHANGELOG.md index ccacc975..8263a7e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## Next Release +* Fixed Server crash when the Client times out or otherwise disconnects + ## 4.2.1 * Added `Spring.connect_timeout` and `Spring.boot_timeout` to allow to increase timeout for larger apps. diff --git a/lib/spring/server.rb b/lib/spring/server.rb index 6eae1ea8..1c6901a5 100644 --- a/lib/spring/server.rb +++ b/lib/spring/server.rb @@ -74,6 +74,8 @@ def serve(client) end rescue SocketError => e raise e unless client.eof? + rescue Errno::EPIPE => e + log "client disconnected with error #{e.message}, ignoring command" ensure redirect_output end