Closing connection after ping