mirror of
https://github.com/gryf/wicd.git
synced 2026-02-24 03:05:47 +01:00
Retry AP association verification 10 times to accomodate cards that are slow to associate. Thanks to muttoni for the patch.
This commit is contained in:
@@ -454,8 +454,14 @@ class ConnectThread(threading.Thread):
|
|||||||
"""
|
"""
|
||||||
if self.network.get('gateway'):
|
if self.network.get('gateway'):
|
||||||
self.SetStatus('verifying_association')
|
self.SetStatus('verifying_association')
|
||||||
print "Verifying AP association"
|
print "Verifying AP association..."
|
||||||
retcode = self.iface.VerifyAPAssociation(self.network['gateway'])
|
for tries in range(1, 11):
|
||||||
|
print "Attempt %d of 10..." % tries
|
||||||
|
retcode = self.iface.VerifyAPAssociation(self.network['gateway'])
|
||||||
|
if retcode == 0:
|
||||||
|
print "Successfully associated."
|
||||||
|
break
|
||||||
|
time.sleep(1)
|
||||||
#TODO this should be in wnettools.py
|
#TODO this should be in wnettools.py
|
||||||
if retcode:
|
if retcode:
|
||||||
print "Connection Failed: Failed to ping the access point!"
|
print "Connection Failed: Failed to ping the access point!"
|
||||||
|
|||||||
Reference in New Issue
Block a user