Comment 5 for bug 533045

Revision history for this message
Lithopsian (x-uzuntu-c) wrote :

Here's the full sequence at the first connection attempt:
1. flags file is present and indicates down, carrier file is not present
2. Run ifconfig %iface% up
3. Immediately, flags file indicates up, carrier file is present and indicates no carrier
4. About 2 seconds later, the carrier file changes to indicate a carrier (ie. plugged in)

In the current code, there is a 2 second sleep after ifconfig up, looping for more sleeps if the flags file still doesn't indicate up. As soon as the flags file indicates up, then it attempts to read the carrier file, which is present but may not yet indicate a carrier is present.

On my machine, it never loops, just one 2 second sleep, and I think this is standard behaviour with current drivers. The carrier file is not changed until slightly over 2 seconds, so I get no connection at the first attempt. Probably for some people, maybe most people, it is just less than 2 seconds and everything seems fine. So the loop on the flags file may not be necessary, but a short loop waiting on the carrier file would be helpful. Obviously not too long since there might not be a carrier even if a wired ethernet connection is configured.