getpeername, Posting, servers that time out

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




First, a request.  No one who subscribes (recently) to this list ever sees
any posts.  I'm on it twice, from two different addresses, and other
than the welcome message don't every get anything.  My "subscription"
to this list entails ftp'ing to suburbia and fetching the articles.  So
if anyone actually sees this, please drop me a line.

I was having a problem with users trying to make a post to 
the "current server", and if the remote server had timed out
on us, the 503 timeout error would be read by post.c as a posting
error, when the post otherwise should have succeded.

I thought of just detaching the current server (it would then
get re-attached automatically in the posting loop), but that
seemd like a hack.  It would have worked, though.  :)

A better fix is to apply Nick Holloway's patch from archive article
614.  Aparently my implementation also has a getpeername that
succeedes on a sockect in CLOSE_WAIT.  I'm not sure if Nick's theory
is correct about select reporting a "won't block" on a closed 
descriptor, but it doesn't matter.  When the remote server times out,
it politely send us a 503 Timeout messages that gets stuck there waiting
for someone to do a read.  The select will report this as data available
to be read, and viola, we know we are out of sync, so we re-open the
connection.

-- 
Aaron Nabil
nabil@teleport.com


[Index of Archives]     [Yosemite]     [Yosemite Campsites]     [Bugtraq]     [Linux]     [Trn]

Powered by Linux