关闭连接那里多写了一行
多线程还真是不好调试
多线程还真是不好调试
2020-01-07
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
举报