Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
--- a/nntp.rb 2010-04-19 12:23:51.000000000 +0200
+++ b/nntp.rb 2010-04-19 12:23:37.000000000 +0200
@@ -397,8 +397,10 @@
@read_timeout, @debug_output)
else
- @socket = InternetMessageIO.open(@address, @port, @open_timeout,
- @read_timeout, @debug_output)
+ socket = timeout(@open_timeout) { TCPSocket.open(@address, @port) }
+ @socket = InternetMessageIO.new(socket)
+ @socket.read_timeout = @read_timeout
+ @socket.debug_output = @debug_output
end
check_response(critical { recv_response() })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment