In general, this is normal for TCP.
Usually it is longer than this - its called linger and it is to allow any stray packets on the net to arrive so that the local port number does not get reused and receive packets from the previous connection. Usually there is an option to turn it off NO_LINGER, but you shouldn't - its there for a reason.