Skip to content

Commit af6440b

Browse files
authored
Merge pull request #727 from prognostikos/prevent-child-errors-from-crashing-server
Prevent server crash by restarting child
2 parents 5f2de87 + 8848593 commit af6440b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## Next Release
22

3+
* Fixed a bug that would crash the server if sending IO to the child failed
4+
35
## 4.3.0
46

57
* Fix reloading issue in Ruby 3.3.

lib/spring/application_manager.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def with_child
4242
if alive?
4343
begin
4444
yield
45-
rescue Errno::ECONNRESET, Errno::EPIPE
45+
rescue Errno::ECONNRESET, Errno::EPIPE, Errno::EINVAL
4646
# The child has died but has not been collected by the wait thread yet,
4747
# so start a new child and try again.
4848
log "child dead; starting"

0 commit comments

Comments
 (0)