Browse Source

Always send NNTP QUIT after server-test

tags/2.3.4RC1
Safihre 7 years ago
parent
commit
a947a1d88b
  1. 6
      sabnzbd/utils/servertests.py

6
sabnzbd/utils/servertests.py

@ -119,8 +119,12 @@ def test_nntp_server(host, port, server=None, username=None, password=None, ssl=
nw.clear_data()
nw.recv_chunk(block=True)
except:
# Some internal error, not always safe to close connection
return False, unicode(sys.exc_info()[1])
# Close the connection
nw.terminate(quit=True)
if nw.status_code == '480':
return False, T('Server requires username and password.')
@ -136,5 +140,3 @@ def test_nntp_server(host, port, server=None, username=None, password=None, ssl=
else:
return False, T('Could not determine connection result (%s)') % nntp_to_msg(nw.data)
# Close the connection
nw.terminate(quit=True)

Loading…
Cancel
Save