handle the "disconnect" command gracefully