function closeWS(
  ws,
  code,
  reason,
) {
  if (ws.readyState !== WebSocket.OPEN) return;
  ws.close(code, reason);
}
/** Use this function to close a ws connection properly */
Use this function to close a ws connection properly
Use this function to close a ws connection properly
function closeWS(
  ws,
  code,
  reason,
) {
  if (ws.readyState !== WebSocket.OPEN) return;
  ws.close(code, reason);
}
function closeWS ( ws , code , reason , ) { if ( ws . readyState !== WebSocket . OPEN ) return ; ws . close ( code , reason ) ; }
Use this function to close a ws connection properly
Use this function to close a ws connection properly