From: Evan S. <ev...@ad...> - 2006-10-23 12:26:16
|
On Oct 21, 2006, at 9:09 PM, Tim Ringenbach wrote: > Did anyone ever (say on IRC) figure this out? If so, I never heard about it. > I have no idea what we could do in this situation, except close the > connection. If read is returning -1 and errno is EAGAIN, it means > either there's nothing to read, or we were interrupted by a signal, > right? I have don't know why this would happen, or what we can do > about it. The only other shot in the dark I can think of is we > received some OOB data, but I don't think that would give an > EAGAIN. But I think we do set the exceptions flag as well as read > on the fd. It does mean nothing was there to read... if it were a signal, wouldn't it need to be being sent repeatedly, once each time that read () is called (and immediately when it is for it to return immediately)? I think the 'nothing there to read' explanation is more likely... The weirdest thing is that it does return data eventually, it seems... after minutes of sucking CPU in that tight loop. I'm not intimately familiar with the details of HTTP... could we be connecting and triggering the callback before any data is ready to be read, and then after some amount of time the server begins actually sending the data? -Evan |