Websockets - IE和Chrome的区别?

时间:2016-08-03 19:13:48

标签: google-chrome internet-explorer firefox websocket timeout

在Websocket断开连接上我在IE 11上出现超时但Chrome似乎工作正常或者可能更容忍超时?我想知道在IE,Chrome和FF中的行为有何不同     这里的jfriend00是在IE和Chrome中表现不同的代码

systemError = function(e, detail, msg) {
     var ts = new Date(), prev = false;        
    // Used to throttle messages so we don't bombard the user
    var checkThrottle = function() {
        // See if we know what the last request type was because we should not throttle on 
        // certain reqeust types
        if (dali.lastWSCommand && (dali.lastWSCommand == 'set' || dali.lastWSCommand  == 'del'))
            return false;

        if (errTimes[detail]) {
            prev = errTimes[detail];
        }
        errTimes[detail] = ts;
        if (prev && ((ts - prev) < 10000)) {

            return true;
        }
        return false;
    }

0 个答案:

没有答案