netsock_server close listening socket after accept_loop exits.