Skip to content

Commit 091f5dc

Browse files
committed
Fix rails#724
This fixes an issue where, when the Spring client times out or otherwise disconnects from the server, that the server crashes with a `Broken pipe (Errno::EPIPE)` error.
1 parent c5987d5 commit 091f5dc

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## Next Release
22

3+
* Fixed Server crash when the Client times out or otherwise disconnects
4+
35
## 4.2.1
46

57
* Added `Spring.connect_timeout` and `Spring.boot_timeout` to allow to increase timeout for larger apps.

lib/spring/server.rb

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ def serve(client)
7474
end
7575
rescue SocketError => e
7676
raise e unless client.eof?
77+
rescue Errno::EPIPE => e
78+
log "client disconnected with error #{e.message}, ignoring command"
7779
ensure
7880
redirect_output
7981
end

0 commit comments

Comments
 (0)