dont assume a connection exists
This commit is contained in:
parent
289bc069c2
commit
41f6cf9d33
1 changed files with 3 additions and 1 deletions
|
|
@ -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: #{$!}"
|
||||||
@connections[server]["nntp"].quit
|
if ! @connections[server]["nntp"].nil?
|
||||||
|
@connections[server]["nntp"].quit
|
||||||
|
end
|
||||||
del_server(server)
|
del_server(server)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue