       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: ->

  startSocketIOServer: ->
    return unless @server?

    @io = socketIo @server

    @io.on 'connection', (socket) =>
      @ioSocket = socket
      @updateContent()

