Handle ping event.