Skip to content

Commit

Permalink
Fixes TCPSocket#closed?
Browse files Browse the repository at this point in the history
By calling #close method in the #unbind hook, the #closed? method will correctly return false when the connection is closed remotely.
  • Loading branch information
johnkchow committed Mar 11, 2012
1 parent 0d176e9 commit f4d44e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/em-synchrony/tcpsocket.rb
Expand Up @@ -60,6 +60,7 @@ def connection_completed
def unbind
@in_req.fail nil if @in_req
@out_req.fail nil if @out_req
close
end

def receive_data(data)
Expand Down

0 comments on commit f4d44e4

Please sign in to comment.