Skip to content

Commit

Permalink
close connection if there are no pending requests, closes igrigorik#184
Browse files Browse the repository at this point in the history
  • Loading branch information
igrigorik committed Mar 31, 2012
1 parent 8e20ecf commit 494615e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/em-http/http_connection.rb
Expand Up @@ -184,6 +184,8 @@ def unbind(reason)
rescue EventMachine::ConnectionError => e rescue EventMachine::ConnectionError => e
@clients.pop.close(e.message) @clients.pop.close(e.message)
end end
else
@conn.close_connection
end end
end end
alias :close :unbind alias :close :unbind
Expand Down

0 comments on commit 494615e

Please sign in to comment.