Function to handle ping request.