Fix bad logic

This commit is contained in:
zandercymatics 2023-10-17 14:53:57 -06:00
parent d943b69b3d
commit 2f4425d914
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -61,7 +61,13 @@ class Socket:
return False
else:
self.disconnect()
return not self.is_login_error(response.code)
# If we encounter a login error, fail
if self.is_login_error(response.code):
return False
# otherwise, just return true
return True
def disconnect(self):
"""Close the connection."""