Clear the ticket when closing the connection