Added verifyReconnect steps to the markActive function of the common transport logic.

- Added a test to verify the behavior.

#2484
Added logic to verify that markActive completed before continuing the heartbeat.