 
       @peer.on 'connection', (connection) =>
         connection.on 'open', =>
-          @sharing = true
           connection.send({repoSnapshot, doc: @doc.serialize()})
           sessionUtils.connectDocument(@doc, connection)
           @trigger 'started'
 
         connection.on 'close', =>
-          @sharing = false
           @participants.each (participant, index) =>
             if connection.peer is participant.get('id')
               @participants.remove(index)

  peer: null
  mediaConnection: null
  doc: null
  sharing: false

  constructor: ->
    @doc = site.createDocument

    @peer.id

  isSharing: ->
    @peer? and not _.isEmpty(@peer.connections)
