mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Rescue SystemCallError as well. Fixes #425
This commit is contained in:
parent
4b866671dd
commit
b01b43d1da
1 changed files with 5 additions and 2 deletions
|
@ -102,13 +102,16 @@ module Puma
|
|||
# 3 == TCP_CORK
|
||||
# 1/0 == turn on/off
|
||||
def cork_socket(socket)
|
||||
socket.setsockopt(6, 3, 1) if socket.kind_of? TCPSocket
|
||||
begin
|
||||
socket.setsockopt(6, 3, 1) if socket.kind_of? TCPSocket
|
||||
rescue IOError, SystemCallError
|
||||
end
|
||||
end
|
||||
|
||||
def uncork_socket(socket)
|
||||
begin
|
||||
socket.setsockopt(6, 3, 0) if socket.kind_of? TCPSocket
|
||||
rescue IOError
|
||||
rescue IOError, SystemCallError
|
||||
end
|
||||
end
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue