diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/net/http.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index a9ff60d663..11c0bad2b2 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1055,6 +1055,10 @@ module Net #:nodoc: end_transport req, res res + rescue => exception + D "Conn close because of error #{exception}" + @socket.close unless @socket.closed? + raise exception end private |
