mirror of
https://github.com/Flowseal/tg-ws-proxy.git
synced 2026-11-24 08:26:30 +03:00
Socket occupation fix
This commit is contained in:
@@ -14,8 +14,10 @@ class TcpFallbackTest(unittest.IsolatedAsyncioTestCase):
|
||||
self.remote = Mock(drain=AsyncMock(), wait_closed=AsyncMock())
|
||||
|
||||
async def fallback(self, dst='192.0.2.1', port=443):
|
||||
writer = Mock()
|
||||
writer.is_closing.return_value = False
|
||||
return await bridge._tcp_fallback(
|
||||
Mock(), Mock(), dst, port, b'init', 'test', Mock())
|
||||
asyncio.StreamReader(), writer, dst, port, b'init', 'test', Mock())
|
||||
|
||||
async def test_failure_backoff_doubles_caps_and_skips_new_connections(self):
|
||||
with patch.object(bridge.asyncio, 'open_connection',
|
||||
|
||||
Reference in New Issue
Block a user