Fix a socket connection problem

This commit is contained in:
Shunsuke Shibayama 2023-01-24 19:57:43 +09:00
parent 4579c86414
commit 64d53a39ce
7 changed files with 101 additions and 5 deletions

View file

@ -6,6 +6,8 @@ import importlib as __importlib
import io as __io
__server_socket = __socket.socket()
if __sys.platform == 'linux':
__server_socket.setsockopt(__socket.SOL_SOCKET, __socket.SO_REUSEADDR, 1)
# DummyVM will replace this __PORT__ with free port
__server_socket.bind(('127.0.0.1', __PORT__))
__server_socket.listen(1)