def close_socket_for_read(self):
"""Close the server-client socket for reads incoming from client.
We do not completly close the socket right now to allow late reads
in the client side. But this socket will soon be closed.
"""
if self._sock is not None:
self.outmsg("Closing socket for reads")
try:
self._sock.shutdown(socket.SHUT_RD)
except Exception:
# already closed
pass
self._sock_accept_reads = False
评论列表
文章目录