I ran your script (the ssh = subprocess.Popen line was not copied right but i corrected it based on the plugin)
These are the times:
0:00:00.305547 (errors=0, maxtime=0:00:00.305547) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.267185 (errors=0, maxtime=0:00:00.305547) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.273844 (errors=0, maxtime=0:00:00.305547) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.284461 (errors=0, maxtime=0:00:00.305547) > data:assoclist 00:04:20:F1:B9:4A
0:00:03.017488 (errors=1, maxtime=0:00:03.017488) > error:Connection timed out during banner exchange
0:00:00.257058 (errors=1, maxtime=0:00:03.017488) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.296393 (errors=1, maxtime=0:00:03.017488) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.278588 (errors=1, maxtime=0:00:03.017488) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.315892 (errors=1, maxtime=0:00:03.017488) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.290391 (errors=1, maxtime=0:00:03.017488) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.300130 (errors=1, maxtime=0:00:03.017488) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.286834 (errors=1, maxtime=0:00:03.017488) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.271826 (errors=1, maxtime=0:00:03.017488) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.250269 (errors=1, maxtime=0:00:03.017488) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.265146 (errors=1, maxtime=0:00:03.017488) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.282633 (errors=1, maxtime=0:00:03.017488) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.285354 (errors=1, maxtime=0:00:03.017488) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.258707 (errors=1, maxtime=0:00:03.017488) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.261462 (errors=1, maxtime=0:00:03.017488) > data:assoclist 00:04:20:F1:B9:4A
0:00:03.016411 (errors=2, maxtime=0:00:03.017488) > error:Connection timed out during banner exchange
0:00:03.021926 (errors=3, maxtime=0:00:03.021926) > error:Connection timed out during banner exchange
0:00:00.301796 (errors=3, maxtime=0:00:03.021926) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.259850 (errors=3, maxtime=0:00:03.021926) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.315365 (errors=3, maxtime=0:00:03.021926) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.262948 (errors=3, maxtime=0:00:03.021926) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.304390 (errors=3, maxtime=0:00:03.021926) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.311065 (errors=3, maxtime=0:00:03.021926) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.294761 (errors=3, maxtime=0:00:03.021926) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.273255 (errors=3, maxtime=0:00:03.021926) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.276446 (errors=3, maxtime=0:00:03.021926) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.259544 (errors=3, maxtime=0:00:03.021926) > data:assoclist 00:04:20:F1:B9:4A
normally approx 0,3 sec, then the occasional time out
I increased the timeout period to see where the max is at
0:00:00.584127 (errors=0, maxtime=0:00:00.584127) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.284415 (errors=0, maxtime=0:00:00.584127) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.307799 (errors=0, maxtime=0:00:00.584127) > data:assoclist 00:04:20:F1:B9:4A
0:00:05.262087 (errors=0, maxtime=0:00:05.262087) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.304684 (errors=0, maxtime=0:00:05.262087) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.288296 (errors=0, maxtime=0:00:05.262087) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.291067 (errors=0, maxtime=0:00:05.306149) > data:assoclist 00:04:20:F1:B9:4A
0:00:05.257716 (errors=0, maxtime=0:00:05.306149) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.287531 (errors=0, maxtime=0:00:05.306149) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.315035 (errors=0, maxtime=0:00:05.306149) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.297320 (errors=0, maxtime=0:00:05.306149) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.279320 (errors=0, maxtime=0:00:05.306149) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.972532 (errors=0, maxtime=0:00:05.306149) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.283783 (errors=0, maxtime=0:00:05.306149) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.277077 (errors=0, maxtime=0:00:05.306149) > data:assoclist 00:04:20:F1:B9:4A
0:00:05.271446 (errors=0, maxtime=0:00:05.306149) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.278571 (errors=0, maxtime=0:00:05.306149) > data:assoclist 00:04:20:F1:B9:4A
0:00:00.258991 (errors=0, maxtime=0:00:05.306149) > data:assoclist 00:04:20:F1:B9:4A
Again typically around 0,3 but occasionally upto almost 6 seconds.
Guess its clear where the issue is ...... now te question why. Between making the contact to the router to closing takes about 1 second in the router log, must be in the NUC. Thanks for your help (you should add the test file to the zip
)
Next search. If there are any ideas they are welcome!!