Some network routers send a message and close the channel after they receive an exit command. If you want to grab the exit message, you should check whether the channel is closed, and if so, read the resting bytes in the closed channel other than waiting for self.channel. recv_ready() (which is always False on a closed channel) and timing out.
Some network routers send a message and close the channel after they receive an exit command. If you want to grab the exit message, you should check whether the channel is closed, and if so, read the resting bytes in the closed channel other than waiting for
self.channel. recv_ready()
(which is alwaysFalse
on a closed channel) and timing out.