revert: drop _connect_nio thread-pool executor, restore async _ubridge_send

The _connect_nio thread-pool optimisation (send_batch_sync) targeted
node-start performance, but start_all already runs at concurrency=3
(by design, to avoid overwhelming the host).  It also introduced a
Python 3.13 incompatibility (trsock.setblocking forbidden) that
prevented docker nodes from starting.  Since node-start is not the
target of this branch (project-open link creation is), revert to the
simple per-command async _ubridge_send.

The project-open batch NIO dispatch (create_batch_nios) is unaffected —
it never called _connect_nio (nodes aren't started during open).
This commit is contained in:
YueGuobin committed 2026-08-11 01:16:13 +08:00
1 parent 46bad0b639
commit 2f70bd6daa
3 files changed
+15 -124

No files matched your search

+3 -6
View File
@@ -1440,12 +1440,9 @@ async def test_add_ubridge_connection(vm):
call.send('bridge create bridge0'),
call.send("bridge add_nio_tap bridge0 tap-gns3-e0"),
call.send('docker move_to_ns tap-gns3-e0 42 eth0'),
call.send_batch_sync([
'bridge add_nio_udp bridge0 4242 127.0.0.1 4343',
'bridge start_capture bridge0 "/tmp/capture.pcap"',
'bridge start bridge0',
'bridge reset_packet_filters bridge0',
]),
call.send('bridge add_nio_udp bridge0 4242 127.0.0.1 4343'),
call.send('bridge start_capture bridge0 "/tmp/capture.pcap"'),
call.send('bridge start bridge0'),
]
assert 'bridge0' in vm._bridges
# We need to check any_order otherwise mock is confused by asyncio