iPhone mismatch between settings showing connection to Wifi SSID and 3G in Top left hand corner showing not connected Sometimes the settings page will show I'm connected to a particular Wifi network SSID, but the 3G logo in the top left hand corner still appears and I still appear to be downloading via 3G. 

What's going on here - is this a caching issue? A wifi connectivity issue? Is this a feature?

--
edit

This is on an iPhone4 with 4.01 - although I've seen it in the past on an iPhone 3G on 3.01.
This has always been a slight quirk with various models of the iPhone. What version of the iPhone are you running, both hardware and software?

I've experienced this exact issue previously on the iPhone 3G. It seemed that, when the phone is but to sleep, it powers down the wifi to preserve battery, and upon wake, the Wifi indicator doesn't immediately update. There may also be a short lag in reconnecting to the Wifi after wake as well. I've actually taken the phone back and had it replaced to try and resolve this issue on one handset that suffered from it particularly badly. The replacement was better, but still showed some of this behaviour.