Skip to content

Commit

Permalink
dont error out if socket is already closed when client readloop ends
Browse files Browse the repository at this point in the history
  • Loading branch information
carlhoerberg committed May 9, 2024
1 parent fc6f6c1 commit 382a701
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/amqproxy/server.cr
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ module AMQProxy
end
rescue ex # only raise from constructor, when negotating
Log.debug { "Client connection failure (#{remote_address}) #{ex.inspect}" }
socket.close
ensure
socket.close rescue nil
end

private def active_client(client, &)
Expand Down

0 comments on commit 382a701

Please sign in to comment.