问答详情
源自:3-4 编写网络服务器测试用例

关闭连接那里多写了一行

多线程还真是不好调试

提问者:qq_夜雨思桦_0 2020-01-07 14:37

个回答

  • qq_夜雨思桦_0
    2020-01-07 14:38:30

    server recv msg: Hello TCPServer

    client recv msg: Hello TCPServer

    Exception in thread Thread-6:

    Traceback (most recent call last):

      File "/usr/local/Cellar/python/3.7.6/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 926, in _bootstrap_inner

        self.run()

      File "/usr/local/Cellar/python/3.7.6/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 870, in run

        self._target(*self._args, **self._kwargs)

      File "/Users/kingvstr/tools/vim/learn-python-net/test/test.py", line 36, in client_connect

        msg = client.recv(1024)

    ConnectionResetError: [Errno 54] Connection reset by peer

    Exception in thread Thread-5:

    Traceback (most recent call last):

      File "/usr/local/Cellar/python/3.7.6/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 926, in _bootstrap_inner

        self.run()

      File "/usr/local/Cellar/python/3.7.6/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 870, in run

        self._target(*self._args, **self._kwargs)

      File "/Users/kingvstr/tools/vim/learn-python-net/test/test.py", line 36, in client_connect

        msg = client.recv(1024)

    ConnectionResetError: [Errno 54] Connection reset by peer


    Exception in thread Thread-4:

    Traceback (most recent call last):

      File "/usr/local/Cellar/python/3.7.6/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 926, in _bootstrap_inner

        self.run()

      File "/usr/local/Cellar/python/3.7.6/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 870, in run

        self._target(*self._args, **self._kwargs)

      File "/Users/kingvstr/tools/vim/learn-python-net/test/test.py", line 36, in client_connect

        msg = client.recv(1024)

    ConnectionResetError: [Errno 54] Connection reset by peer



    Exception in thread Thread-2:

    Traceback (most recent call last):

      File "/usr/local/Cellar/python/3.7.6/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 926, in _bootstrap_inner

        self.run()

      File "/usr/local/Cellar/python/3.7.6/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 870, in run

        self._target(*self._args, **self._kwargs)

      File "/Users/kingvstr/tools/vim/learn-python-net/test/test.py", line 36, in client_connect

        msg = client.recv(1024)

    ConnectionResetError: [Errno 54] Connection reset by peer