Don't re-raise in Client.connect if it's a clean close code.
This commit is contained in:
parent
3fbeb94cdb
commit
2e57fa6dfd
@ -396,6 +396,9 @@ class Client:
|
|||||||
|
|
||||||
if not reconnect:
|
if not reconnect:
|
||||||
yield from self.close()
|
yield from self.close()
|
||||||
|
if isinstance(e, ConnectionClosed) and e.code == 1000:
|
||||||
|
# clean close, don't re-raise this
|
||||||
|
return
|
||||||
raise
|
raise
|
||||||
|
|
||||||
if self.is_closed():
|
if self.is_closed():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user