viewtopic.php?f=16&t=369#p2432
I thought I would write and share my experience.
The code was working great and I thought my problems were gone. Then my router died, a totally unrelated event. I got a new router, an Apple Airport Extreme. I had been using WEP, but this new router does not support WEP, so now I am using WPA2. First thing I noticed was that CONNECTION_TIMEOUT no longer seemed long enough. I tried increasing it to about 65, but then found that the WiServer would not be re-inited. The code:
else if (millis() - connectTime > CONNECTION_TIMEOUT * 1000)
would never be true. Confusion. I changed the define to
#define CONNECTION_TIMEOUT (unsigned long)65000
and the line of code to
else if (millis() - connectTime > CONNECTION_TIMEOUT)
I also change the variable declaration of connectTime to
unsigned long connectTime = 0;
Which now seems to work. I can disconnect the AP for some time (minutes, hopefully later hours) and reconnect it and the WiServer will come back on line

I wish I could sound all smart and tell you why the two lines of code are not the same, but I can't.
I like the changes that shard7 made to WiServer. Even when the WiShield would lose connection the rest of the code worked just fine. I have just made the changes noted above, We will see in a day or so if this keeps working.
Tim