rlx_port.py 文件源码

python
阅读 37 收藏 0 点赞 0 评论 0

项目:relaax 作者: deeplearninc 项目源码 文件源码
def start_worker(cls, connection, address):
        try:
            RLXWorker.run(connection, address)
        except KeyboardInterrupt:
            pass
        finally:
            log.debug('Closing connection %s:%d' % address)
            if sys.platform == 'win32':
                os._exit(-1)             
            else:            
                try:
                    connection.shutdown(socket.SHUT_RDWR)
                except socket.error as e:
                    # we don't care if the socket is already closed;
                    # this will often be the case if client closed connection first
                    if e.errno != errno.ENOTCONN:
                        raise
                finally:
                    connection.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号