Home  >  Q&A  >  body text

html5 - WebSocket提示错误: WebSocket is already in CLOSING or CLOSED state?

提示错误:

WebSocket is already in CLOSING or CLOSED state?
迷茫迷茫2741 days ago3956

reply all(2)I'll reply

  • 怪我咯

    怪我咯2017-04-17 11:43:57

    This prompt gives too little information.
    If you are a front-end developer, I suggest you open the chrome console and see if there is an error message like the following: WebSocket handshake: Unexpected response code: 404 -
    I also saw the close above when I started learning, and then I opened the console and saw this problem: there was a problem with websocket during initialization, which is the three-way handshake

    The first idea is: Is the path wrong? Then check the space problem in the front and backend. Then check all the path problems and you can run
    The answer on stackoverflow is another answer: http: //stackoverflow.com/ques...

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 11:43:57

    Check the status
    php xxx.php status
    Check the exit_status status code
    Then see if an exception is thrown

    reply
    0
  • Cancelreply