Problem with TCP Connection Close



I am currently developing a tool using Python 2.4.2 which will be used
as a sink to pump TCP messages. Something is going wrong while closing
the connection.
This i confirmed by looking at the ethereal logs, which show proper 3
way FIN ACK Handshake. But the netstat reports TIME_WAIT state for the
TCP connection, which is hindering the messages to be pumped later. I
would like to know the probable cause for the problem.

.