[Violation] 'message' handler took xxxms

Any idea why I get this error and it signals the onmessage event of the websocket

function loadWebSocket(url, callback = () => {}) {	
	var socket = new WebSocket(url);
	socket.onmessage = function (e) {
	socket.onclose = function (e) {
		setTimeout("loadWebSocket('" + url + "', " + callback + ")", 10000);
	socket.onerror = function (err) {

The strange thing is that nothing moved him, he was just modifying the callback function and when he finished the changes when running the project, that message did not stop coming one after another

error can happen for many reason. Only when connection is build and message come from server, the onmessage can be triggered.