Name
connectionLost
Synopsis
p
.connectionLost(reason
)
Called when the connection to the counterpart has been closed.
Argument reason
is an object explaining
why the connection has been closed. reason
is not an instance of a Python exception, but has an attribute
reason
.value
that
normally is such an instance. You can use
str(
reason
)
to get an explanation string, including a brief traceback, or
str(
reason
.value)
to get just the explanation string without any traceback.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.