include the linger step from destroy below.  The only difference between term and destroy is closing sockets.