Close listening socket before exiting.