Skip to content

Commit

Permalink
Close the socket when we're done
Browse files Browse the repository at this point in the history
  • Loading branch information
tarcieri committed Feb 10, 2012
1 parent 6865c31 commit 6bc0f4a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/echo_server.rb
Expand Up @@ -29,6 +29,7 @@ def handle_connection(socket)
loop { socket.write socket.readpartial(4096) }
rescue EOFError
puts "*** #{host}:#{port} disconnected"
socket.close
end
end

Expand Down

0 comments on commit 6bc0f4a

Please sign in to comment.