Socket.io在浏览器控制台中发送错误

时间:2017-01-09 08:43:32

标签: javascript socket.io

是否可以在socket.io/javascript中隐藏此类错误?

enter image description here

我试过了

    socket.on('connect_error', function (error) {
        return errorHandler(error);
    });

但是这样处理只允许我在发生错误的情况下对我的应用程序采取措施,但浏览器控制台仍然存在错误。

使用此代码连接尝试socket.io服务器时会触发此错误

    socket = io.connect(
        settings.requestUri,
        {
            query: 'token=' + settings.requestToken,
            reconnectionDelay: 500,
            reconnectionAttempts: 15
        }
    );

0 个答案:

没有答案