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
@writable = false
_emit :error, e
close
close if @readable
nil
end
@ -210,7 +210,7 @@ module Landline
end
rescue Errno::ECONNRESET => e
_emit :error, e
close
close if @readable or @writable
nil
end
@ -224,7 +224,7 @@ module Landline
end
rescue Errno::ECONNRESET => e
_emit :error, e
close
close if @readable or @writable
nil
end
end