Websocket's close method doesn't work.

  1. describe your problem

after each timeline interaction, you need to stop the previous websocket connection to prevent the displayed query data from being instantly updated by the new data pushed back, so call the ws.close () method to close the websocket push every time you click the time query button. However, the close method does not take effect

Nov.10,2021

the close method of Websocket must be registered before it can take effect.

  var ws = new WebSocket(url);
  ws.onopen = function() {
      ws.send(JSON.stringify(param));
  }
  ws.onmessage = callback

  //closeclose
  ws.onclose = function() {}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b4271d-2c60d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b4271d-2c60d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?