           @processLogin7Response()
     LOGGED_IN:
       name: 'LoggedIn'
+      events:
+        socketError: (error) ->
+          @transitionTo(@STATE.FINAL)
     SENT_CLIENT_REQUEST:
       name: 'SentClientRequest'
       events:
+        socketError: (error) ->
+          @transitionTo(@STATE.FINAL)
         packet: (packet) ->
           @sendPacketToTokenStreamParser(packet)
         message: ->

      enter: ->
        @emptyMessageBuffer()
      events:
        connectTimeout: ->
          @transitionTo(@STATE.FINAL)
        packet: (packet) ->

    SENT_LOGIN7_WITH_STANDARD_LOGIN:
      name: 'SentLogin7WithStandardLogin'
      events:
        socketError: (error) ->
          @transitionTo(@STATE.FINAL)
        connectTimeout: ->
          @transitionTo(@STATE.FINAL)
        packet: (packet) ->
