Merge branch '2.2' into telnet_server_rw_telnetlib3

pull/2342/head
Jeremy Grossmann 4 months ago committed by GitHub
commit a91740dae0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -263,9 +263,17 @@ class AsyncioTelnetServer(TelnetServer):
reader_read = await self._get_reader(network_reader) reader_read = await self._get_reader(network_reader)
# Replicate the output on all clients # Replicate the output on all clients
for connection in self._connections.values(): for connection_key in list(self._connections.keys()):
connection.writer.write(data) client_info = connection_key.get_extra_info("socket").getpeername()
await connection.writer.drain() 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): async def _read(self, cmd, buffer, location, reader):
""" Reads next op from the buffer or reader""" """ Reads next op from the buffer or reader"""

@ -1,12 +1,12 @@
jsonschema>=4.17.3,<4.18 # v4.17.3 is the last version to support Python 3.7 jsonschema>=4.17.3,<4.18 # v4.17.3 is the last version to support Python 3.7
aiohttp>=3.8.6,<3.9; python_version == '3.7' # v3.8.6 is the last version to support Python 3.7 aiohttp>=3.8.6,<3.9; python_version == '3.7' # v3.8.6 is the last version to support Python 3.7
aiohttp>=3.9.0,<3.10; python_version > '3.7' aiohttp>=3.9.3,<3.10; python_version > '3.7'
aiohttp-cors>=0.7.0,<0.8 aiohttp-cors>=0.7.0,<0.8
aiofiles>=23.2.1,<23.3 aiofiles>=23.2.1,<23.3
Jinja2>=3.1.2,<3.2 Jinja2>=3.1.3,<3.2
sentry-sdk==1.39.2,<1.40 sentry-sdk==1.39.2,<1.40
psutil==5.9.8 psutil==5.9.8
async-timeout>=4.0.2,<4.1 async-timeout>=4.0.3,<4.1
distro>=1.9.0 distro>=1.9.0
py-cpuinfo>=9.0.0,<10.0 py-cpuinfo>=9.0.0,<10.0
platformdirs>=2.4.0 platformdirs>=2.4.0

Loading…
Cancel
Save