       console.error 'Broadcast has not started'
       return
 
+    @stopSocketIOServer()
+    @stopServer()
+
+  stopServer: ->
     if @sockets.length > 0
       for socket in @sockets
         socket.destroy()

  editor: null
  server: null
  sockets: []
  ioSocket: null

  start: ->

    @server = null

    console.log 'Broadcast stopped.'

  stopSocketIOServer: ->
    return unless @io?

    @io = null

  updateContent: ->
    return unless @ioSocket?
