fixed double socket close in rescue

This commit is contained in:
Yessiest 2024-07-09 17:26:08 +04:00
parent 8284c58509
commit f2e995dcc0
1 changed files with 3 additions and 3 deletions

View File

@ -93,7 +93,7 @@ module Landline
rescue Errno::EPIPE => e rescue Errno::EPIPE => e
@writable = false @writable = false
_emit :error, e _emit :error, e
close close if @readable
nil nil
end end
@ -210,7 +210,7 @@ module Landline
end end
rescue Errno::ECONNRESET => e rescue Errno::ECONNRESET => e
_emit :error, e _emit :error, e
close close if @readable or @writable
nil nil
end end
@ -224,7 +224,7 @@ module Landline
end end
rescue Errno::ECONNRESET => e rescue Errno::ECONNRESET => e
_emit :error, e _emit :error, e
close close if @readable or @writable
nil nil
end end
end end