code: function onPeerClose(peer)
      {
          var id = peer.id;
          scope.removePeer(peer);
          sendPeerClose(id);
  
          scope.dispatchEvent("peerDisconnected",id);
      }
docs: invoked when peer closes, this will remove peer from dictionary