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