Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-5221

Show websocket close reason

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Major Major
    • 10.0.0
    • 9.6.2
    • None
    • Security Level: Jimmy
    • None

      User Story

      As an app dev, I want to know the reason for closing a WebSocket connection, so that I can decide to take further action e.g. debug or fix an error.

      Acceptance Criteria

      provide a way to check close reason

      Details

      • In ZK-5220, the websokcet closes suddenly, if zk prints CloseEvent.reason, it's easier to locate the root cause. In the future, a websocket might close a connect in any reason, a log of closing reason is helpful for debugging.
      • zWs.Manager
        onClose: function onClose(reason){
            //print the reason
        }
        
      • suggest rename the onClose() argument, reason, to closeEvent and print closeEvent.reason

            jumperchen jumperchen
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: