Apparently all HTC phones (includes the Nexus One and probably some non-HTC) put the phone wifi into a power saving mode which *drastically* reduces the power/speed of the connection, either causing timeouts or very very slow speeds.
I'm running stock Android 2.2.1 on my Nexus One and just confirmed that this bug exists by testing it with a ftp file transfer using swiftp, screen on & off, the transfer speed shoots up if the screen is on. This is with my wifi sleep policy set to "never turn off".
Here is the official Android issue for it:
http://code.google.com/p/android/issues/detail?id=9781
Here is the Cyanogenmod issue for it:
http://code.google.com/p/cyanogenmod/is ... il?id=2403
And here is a fix (but looks like only for Android 2.3):
http://code.google.com/p/android/issues ... d=9781#c32
More info on the bug with a downloadable ROM:
http://forum.xda-developers.com/showthread.php?t=752856
It looks like you can use "PARTIAL_WAKE_LOCK" on HTC devices to workaround this issue in older Android versions:
http://code.google.com/p/csipsimple/iss ... ?id=81#c34