The WebSocket.close() method closes the already CLOSED, this method does nothing.
WebSocket.close()
CLOSED
MDN Reference