Skip to content

Commit

Permalink
Close some dangling sockets in specs
Browse files Browse the repository at this point in the history
  • Loading branch information
HertzDevil committed Nov 6, 2024
1 parent 650bb6d commit 676617d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/std/socket/socket_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ describe Socket, tags: "network" do

expect_raises(IO::TimeoutError) { server.accept }
expect_raises(IO::TimeoutError) { server.accept? }

server.close
end

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

it "sends and receives messages" do
Expand Down

0 comments on commit 676617d

Please sign in to comment.