Don't re-raise in Client.connect if it's a clean close code.

This commit is contained in:
Rapptz committed 2017-07-14 11:06:00 -04:00
1 parent 3fbeb94cdb
commit 2e57fa6dfd
1 file changed
+3
+3
View File
@@ -396,6 +396,9 @@ class Client:
if not reconnect:
yield from self.close()
if isinstance(e, ConnectionClosed) and e.code == 1000:
# clean close, don't re-raise this
return
raise
if self.is_closed():