Add event to monitor connectivity.

Updated