浏览代码

changed the connection to non-blocking

/develop-generalizationTraining-TrainerController
vincentpierre 7 年前
当前提交
bddfb85e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      python/unityagents/environment.py

2
python/unityagents/environment.py


try:
self._socket.listen(1)
self._conn, _ = self._socket.accept()
self._conn.settimeout(30)
self._conn.setblocking(1)
p = self._conn.recv(self._buffer_size).decode('utf-8')
p = json.loads(p)
except socket.timeout as e:

正在加载...
取消
保存