From ce97d7e532e4c5383e6e1e91ddad446a4fe489c2 Mon Sep 17 00:00:00 2001 From: Ward Wouts Date: Wed, 19 May 2004 09:55:12 +0000 Subject: [PATCH] some robustness changes --- trunk/ripnews/news/article.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/trunk/ripnews/news/article.rb b/trunk/ripnews/news/article.rb index 4a3ee1f..f231f1c 100644 --- a/trunk/ripnews/news/article.rb +++ b/trunk/ripnews/news/article.rb @@ -1,8 +1,8 @@ -# $Dwarf: article.rb,v 1.79 2003/09/23 12:47:54 ward Exp $ +# $Dwarf: article.rb,v 1.80 2003/11/12 14:01:43 ward Exp $ # $Source$ # -# Copyright (c) 2002, 2003 Ward Wouts +# Copyright (c) 2002, 2003, 2004 Ward Wouts # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -67,7 +67,7 @@ def reconnect(server) begin sleep 3 @connections[server]["nntp"] = Net::NNTP.new(server) - rescue SocketError, Errno::EINVAL, EOFError + rescue SocketError, Errno::EINVAL, EOFError, Errno::ETIMEDOUT print "Reconnect to #{server} failed: #{$!}\n" del_server(server) raise PermError, "Couldn't connect to #{server}" @@ -222,6 +222,7 @@ def get_xhdr(server, range, header) begin timeout(180) do begin + p Time.now if Debuglevel > 1 print "getting headers: #{header}, #{range}\n" if Debuglevel > 1 resp, lines = @connections[server]["nntp"].xhdr(header, range) if resp.to_i == 500 @@ -374,7 +375,7 @@ end def get_group_body_first(subj) group_subject_sort(subj) i = 0 - unless @groups[subj]["messages"][0] + unless @groups[subj]["messages"] != nil && @groups[subj]["messages"][0] return false end while @gotten.has_key?(@groups[subj]["messages"][0]) == false