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

- Added a test to verify the behavior.

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