-terminate hangs forever if we don’t invoke -closeSockets first