You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im trying to add some resilience to my clients such that if they attempt to connect to a port on the server that is busy, they automatically increment the port number within the range of open server ports. This is what I am trying. The problem is it seems never to trigger the exception. If I make port 5200 busy with another client, the test seems just to fail silently. Surely I can't be the first person to attempt this. Any ideas how I can force a retry?
client = iperf3.Client()
client.duration = 15
client.server_hostname = 'x.x.x.x'
client.verbose = True
client.reverse = True
print('a')
i = 0
while i < 9:
print('b')
try:
client.port = 5200 + i
print('c')
result = client.run()
print(result.received_Mbps)
i = 10
print(str(client.port))
except:
i = i + 1
The text was updated successfully, but these errors were encountered:
Im trying to add some resilience to my clients such that if they attempt to connect to a port on the server that is busy, they automatically increment the port number within the range of open server ports. This is what I am trying. The problem is it seems never to trigger the exception. If I make port 5200 busy with another client, the test seems just to fail silently. Surely I can't be the first person to attempt this. Any ideas how I can force a retry?
The text was updated successfully, but these errors were encountered: