Skip to content

Commit

Permalink
Make sure a socket is closed after it has hit EOF
Browse files Browse the repository at this point in the history
  • Loading branch information
kylef committed Jul 18, 2010
1 parent cd11370 commit 4eb7c1f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/zmb.rb
Expand Up @@ -193,6 +193,7 @@ def socket_run(timeout)
result[0].select{|sock| @sockets.has_key?(sock)}.each do |sock|
if sock.eof? then
@sockets[sock].disconnected(self, sock) if @sockets[sock].respond_to?('disconnected')
sock.close
socket_delete sock
debug(@sockets[sock], "Socket EOF")
else
Expand Down

0 comments on commit 4eb7c1f

Please sign in to comment.