My "hacky-fix" to the problem is simply to add a PR_Sleep(small-timeout) 
to the loop (the loop between PR_Poll and the call to get more data to 
write) .  I have tested this on all three major platforms and it seems 
to do the trick.  FTP no longer bangs on the CPU, and it remains 
acceptably responsive even on a fast internet connection.

Darin



Simon Fraser wrote:

> Darin Fisher wrote:
> 
>> Doug,
>> 
>> I found a way to avoid breaking FTP.  I can just disable suspending the
>> socket transport when mSelectFlags includes PR_POLL_READ.  This should
>> only effect FTP and would result in the CPU-hogging behavior of FTP as
>> it is now.
> 
> 
> This kind of stuff is very likely to break Mac (since we have a funky
> hacked up implementation of pollable sockets). Please test on Mac before
> checking in. For help on Mac networking issues, talk to Gordon Sheridan.
> 
> Simon
> 


Reply via email to