mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 11:18:11 +00:00
Merge branch '2.2' into 3.0
# Conflicts: # .github/workflows/testing.yml # gns3server/compute/docker/__init__.py # gns3server/compute/docker/docker_vm.py # gns3server/run.py # requirements.txt # setup.py # tests/compute/docker/test_docker_vm.py
This commit is contained in:
commit
800920e3df
@ -193,8 +193,8 @@ class Docker(BaseManager):
|
||||
if timeout is None:
|
||||
timeout = 60 * 60 * 24 * 31 # One month timeout
|
||||
|
||||
if path == "version":
|
||||
url = "http://docker/v1.12/" + path # API of docker v1.0
|
||||
if path == 'version':
|
||||
url = "http://docker/v1.24/" + path
|
||||
else:
|
||||
url = "http://docker/v" + DOCKER_MINIMUM_API_VERSION + "/" + path
|
||||
try:
|
||||
|
@ -291,9 +291,17 @@ class AsyncioTelnetServer:
|
||||
reader_read = await self._get_reader(network_reader)
|
||||
|
||||
# Replicate the output on all clients
|
||||
for connection in self._connections.values():
|
||||
connection.writer.write(data)
|
||||
await connection.writer.drain()
|
||||
for connection_key in list(self._connections.keys()):
|
||||
client_info = connection_key.get_extra_info("socket").getpeername()
|
||||
connection = self._connections[connection_key]
|
||||
|
||||
try:
|
||||
connection.writer.write(data)
|
||||
await asyncio.wait_for(connection.writer.drain(), timeout=10)
|
||||
except:
|
||||
log.debug(f"Timeout while sending data to client: {client_info}, closing and removing from connection table.")
|
||||
connection.close()
|
||||
del self._connections[connection_key]
|
||||
|
||||
async def _read(self, cmd, buffer, location, reader):
|
||||
""" Reads next op from the buffer or reader"""
|
||||
|
Loading…
Reference in New Issue
Block a user