Make sure to clear connection after message processing