Created function isConnectionDropped and event droppedConnection