diff options
Diffstat (limited to 'lib/net/http.rb')
-rw-r--r-- | lib/net/http.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index 38dca6a440..bb4934be6f 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -416,7 +416,7 @@ module Net # :nodoc: do_start return yield(self) ensure - finish if @started + finish end end do_start @@ -437,9 +437,7 @@ module Net # :nodoc: private :on_connect # Finishes HTTP session and closes TCP connection. - # If HTTP session had not started, raises an IOError. def finish - raise IOError, 'closing already closed HTTP session' unless @started @socket.close if @socket and not @socket.closed? @socket = nil @started = false |