Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Johannes Müller <[email protected]>
  • Loading branch information
HertzDevil and straight-shoota authored Nov 6, 2024
1 parent 676617d commit f0e35af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion spec/std/socket/socket_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ describe Socket, tags: "network" do
expect_raises(IO::TimeoutError) { server.accept }
expect_raises(IO::TimeoutError) { server.accept? }

server.close
ensure
server.try &.close
end

it "sends messages" do
Expand Down
3 changes: 2 additions & 1 deletion spec/std/socket/udp_socket_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ describe UDPSocket, tags: "network" do
socket = UDPSocket.new(family)
socket.bind(address, 0)
socket.local_address.address.should eq address
socket.close
ensure
socket.try &.close
end

it "sends and receives messages" do
Expand Down

0 comments on commit f0e35af

Please sign in to comment.