mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 11:44:49 +08:00
FIX: Catch broken pipe errors
This commit is contained in:
parent
777f1f0f47
commit
1b526ebd91
|
@ -37,7 +37,7 @@ class SocketServer
|
|||
socket = nil
|
||||
begin
|
||||
socket = server.accept
|
||||
rescue IOError
|
||||
rescue IOError, Errno::EPIPE
|
||||
# socket was shut down or something catastrophic like that happened
|
||||
return false
|
||||
end
|
||||
|
@ -61,7 +61,7 @@ class SocketServer
|
|||
end
|
||||
|
||||
true
|
||||
rescue IOError => e
|
||||
rescue IOError, Errno::EPIPE
|
||||
# nothing to do here, case its normal on shutdown
|
||||
rescue => e
|
||||
Rails.logger.warn("Failed to handle connection in stats socket #{e}")
|
||||
|
|
Loading…
Reference in New Issue
Block a user