gwtmp01 / mac.com wrote:
> 
> On Sep 26, 2006, at 3:26 PM, Daniel Berger wrote:
>> Also, I think there's a bug with the local connection not closing 
>> properly.
>> The local connection appears to go into a TIME_WAIT, and it looks to 
>> me like
>> it's the OS that finally closes it out.   Here's a short program to
>> demonstrate:
> 
> This is the normal behavior for a TCP session.  After the server sends the
> final ACK to the client, the TCP session must remain in the TIME_WAIT state
> for twice the maximum segment lifetime.  The delay is to handle lost acks,
> or stray duplicate segments that arrive after the session has been 
> closed.  It
> is the kernel that takes care of this housekeeping.
> 
> See Stevens, TCP/IP Illustrated V1 p 242 for details.

Ok, thanks.

>> Also, if I try to connect while it's in a TIME_WAIT state, I get this:
>>
>> tcpsocket.rb:5:in `initialize': Address family not supported by protocol
>> family - bind(2) (Errno::EAFNOSUPPORT)
>>        from tcpsocket.rb:5
> 
> Is this an error from the client trying to connect to the server in the 
> TIME_WAIT
> state or is this the error you are getting from the server trying to 
> restart and
> bind and reuse the local port that is still in the TIME_WAIT state?

I get that error if I try to run the same script again before the OS has closed 
the connection.  I'm expecting an error, just not *that* error.  It's not a 
major issue, mind you.  I just thought it was odd.

> You use of the word 'connect' is a bit confusing since that is not 
> generally used
> to describe the behavior of a TCP server.

I'm not sure where you mean? In my rdoc patch? I'm sure it could use 
improvement - I'm hoping people on the list can improve the wording.

Regards,

Dan

PS - My apologies for the corporate disclaimer.  I'll try to setup my gmail 
account through my email client at work.  Hopefully, I'll be able to post 
without the disclaimer and the sucky formatting.


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.