This is normal and is due to a so called 2MSL timeout value, which is part of the TCP specification. After a connection has been closed by both the client and the server, the port becomes unavailable for a certain amount of time, so that a new program does not inadvertently get packets that were intended for the old program.