     console.log "Chat Client Chat Start Peding"
 
   pollMessages: ->
-    return if @state == stateEnum.KILLED
+    return if @state == stateEnum.TERMINATED
     console.log "Chat Client is polling for messages"
     $.get @endpoint, (data) =>
-      @state = stateEnum.STARTED
+      @state = stateEnum.ACTIVE
       @dismissWelcome()
       @dequeueMessages()
       @renderMessages data.events

  stateEnum = {
    INITIAL: 0
    START_PENDING: 1,
    STARTED: 2,
    KILLED: 3
  }

  constructor: ->

      type: 'DELETE'
    console.log "Chat Terminated"

    @state = stateEnum.TERMINATED
    console.log "Chat Client Chat Terminated"
