React to ping and close