dont assume a connection exists

This commit is contained in:
Ward Wouts 2014-01-04 19:20:45 +00:00
parent 289bc069c2
commit 41f6cf9d33

View file

@ -163,7 +163,9 @@ def initialize(nntpservers, groupname, newsrc="~/.newsrc")
set_skip_ids(server, @connections[server]["newsrc"].marked_articles(@group)) set_skip_ids(server, @connections[server]["newsrc"].marked_articles(@group))
rescue SocketError, Errno::EINVAL, EOFError, Errno::ETIMEDOUT rescue SocketError, Errno::EINVAL, EOFError, Errno::ETIMEDOUT
puts "Connection to #{server} failed: #{$!}" puts "Connection to #{server} failed: #{$!}"
if ! @connections[server]["nntp"].nil?
@connections[server]["nntp"].quit @connections[server]["nntp"].quit
end
del_server(server) del_server(server)
end end
} }