{"action":"created","issue":{"url":"https://api.github.com/repos/BrowserSync/browser-sync/issues/439","labels_url":"https://api.github.com/repos/BrowserSync/browser-sync/issues/439/labels{/name}","comments_url":"https://api.github.com/repos/BrowserSync/browser-sync/issues/439/comments","events_url":"https://api.github.com/repos/BrowserSync/browser-sync/issues/439/events","html_url":"https://github.com/BrowserSync/browser-sync/issues/439","id":57330118,"number":439,"title":"Infinite requests loop","user":{"login":"ocombe","id":265378,"avatar_url":"https://avatars.githubusercontent.com/u/265378?v=3","gravatar_id":"","url":"https://api.github.com/users/ocombe","html_url":"https://github.com/ocombe","followers_url":"https://api.github.com/users/ocombe/followers","following_url":"https://api.github.com/users/ocombe/following{/other_user}","gists_url":"https://api.github.com/users/ocombe/gists{/gist_id}","starred_url":"https://api.github.com/users/ocombe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocombe/subscriptions","organizations_url":"https://api.github.com/users/ocombe/orgs","repos_url":"https://api.github.com/users/ocombe/repos","events_url":"https://api.github.com/users/ocombe/events{/privacy}","received_events_url":"https://api.github.com/users/ocombe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-02-11T15:26:30Z","updated_at":"2015-02-26T14:35:42Z","closed_at":"2015-02-26T10:12:00Z","body":"Hi, I've been using the new version of browser sync (currently 2.0.1 but I had this bug with the 2.0.0 rc as well) and sometimes when I load the page BS starts an infinite loop of GET/POST requests (1 request every few ms) and my CPU usage jumps through the roof.\r\n\r\n![bs-loop](https://cloud.githubusercontent.com/assets/265378/6149566/ecdd1d6c-b209-11e4-87ed-79dd5a61dddf.png)\r\n\r\nI'm not sure what is the cause of this bug, but it only loops like 1 on every 3 reloads or so (kinda random).\r\n\r\nI'm using BS in proxy mode with gulp (not all my gulpfile is here):\r\n```js\r\ngulp.task('sass', ['sass-cache'], function() {\r\n    return gulp.src(path.output.cache + '/sass/**/*.css')\r\n        .pipe($.sourcemaps.init({loadMaps: true}))\r\n        .pipe($.concat('app.css'))\r\n        .pipe($.sourcemaps.write('.'))\r\n        .pipe(gulp.dest(path.output.base + '/css'))\r\n        .pipe(browserSync.reload({stream: true}));\r\n});\r\n\r\ngulp.task('serve', function(done) {\r\n    browserSync({\r\n        open: false,\r\n        port: 9000,\r\n        proxy: \"front.local\"\r\n    }, done);\r\n});\r\n\r\ngulp.task('watch', ['compile'], function() {\r\n    function onChange(event) {\r\n        console.log('File ' + event.path + ' was ' + event.type + ', running tasks...');\r\n    }\r\n    gulp.watch([path.src], ['es6']).on('change', onChange);\r\n    gulp.watch([path.sass], ['sass']).on('change', onChange);\r\n    gulp.watch([path.html], ['compile']).on('change', onChange);\r\n});\r\n```\r\n\r\nThe GET requests return \"\u0001ÿ3\" and the POST request return \"ok\"\r\n\r\nGet request:\r\n``` \r\nRemote Address:127.0.0.1:9000\r\nRequest URL:http://localhost:9000/browser-sync/socket.io/?EIO=3&transport=polling&t=1423668278777-4419&sid=4-vYXkHReSKpYJjfAAAH\r\nRequest Method:GET\r\nStatus Code:200 OK\r\nRequest Headersview source\r\nAccept:*/*\r\nAccept-Encoding:gzip, deflate, sdch\r\nAccept-Language:fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4\r\nCache-Control:no-cache\r\nConnection:keep-alive\r\nCookie:io=4-vYXkHReSKpYJjfAAAH; xrfkey=NrckMRWHtX5CFi9k; AccessPointSession=ac96a942-c110-6c5c-da62-4c3ceb5384c4; hmxt=%7BF45AA94D-2960-BBE2-DE47-D2508957A128%7D; user_id=93\r\nHost:localhost:9000\r\nPragma:no-cache\r\nReferer:http://localhost:9000/\r\nUser-Agent:Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36\r\nQuery String Parametersview sourceview URL encoded\r\nEIO:3\r\ntransport:polling\r\nt:1423668278777-4419\r\nsid:4-vYXkHReSKpYJjfAAAH\r\nResponse Headersview source\r\nAccess-Control-Allow-Origin:*\r\nConnection:keep-alive\r\nContent-Length:4\r\nContent-Type:application/octet-stream\r\nDate:Wed, 11 Feb 2015 15:24:38 GMT\r\nSet-Cookie:io=4-vYXkHReSKpYJjfAAAH\r\n```\r\n\r\nPOST request:\r\n```\r\nRemote Address:127.0.0.1:9000\r\nRequest URL:http://localhost:9000/browser-sync/socket.io/?EIO=3&transport=polling&t=1423668278771-4418&sid=4-vYXkHReSKpYJjfAAAH\r\nRequest Method:POST\r\nStatus Code:200 OK\r\nRequest Headersview source\r\nAccept:*/*\r\nAccept-Encoding:gzip, deflate\r\nAccept-Language:fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4\r\nCache-Control:no-cache\r\nConnection:keep-alive\r\nContent-Length:3\r\nContent-type:text/plain;charset=UTF-8\r\nCookie:io=4-vYXkHReSKpYJjfAAAH; xrfkey=NrckMRWHtX5CFi9k; AccessPointSession=ac96a942-c110-6c5c-da62-4c3ceb5384c4; hmxt=%7BF45AA94D-2960-BBE2-DE47-D2508957A128%7D; user_id=93\r\nHost:localhost:9000\r\nOrigin:http://localhost:9000\r\nPragma:no-cache\r\nReferer:http://localhost:9000/\r\nUser-Agent:Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36\r\nQuery String Parametersview sourceview URL encoded\r\nEIO:3\r\ntransport:polling\r\nt:1423668278771-4418\r\nsid:4-vYXkHReSKpYJjfAAAH\r\nRequest Payload\r\n1:2\r\nResponse Headersview source\r\nAccess-Control-Allow-Credentials:true\r\nAccess-Control-Allow-Origin:http://localhost:9000\r\nConnection:keep-alive\r\nContent-Length:2\r\nContent-Type:text/html\r\nDate:Wed, 11 Feb 2015 15:24:38 GMT\r\nSet-Cookie:io=4-vYXkHReSKpYJjfAAAH\r\n```"},"comment":{"url":"https://api.github.com/repos/BrowserSync/browser-sync/issues/comments/76187931","html_url":"https://github.com/BrowserSync/browser-sync/issues/439#issuecomment-76187931","issue_url":"https://api.github.com/repos/BrowserSync/browser-sync/issues/439","id":76187931,"user":{"login":"ocombe","id":265378,"avatar_url":"https://avatars.githubusercontent.com/u/265378?v=3","gravatar_id":"","url":"https://api.github.com/users/ocombe","html_url":"https://github.com/ocombe","followers_url":"https://api.github.com/users/ocombe/followers","following_url":"https://api.github.com/users/ocombe/following{/other_user}","gists_url":"https://api.github.com/users/ocombe/gists{/gist_id}","starred_url":"https://api.github.com/users/ocombe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocombe/subscriptions","organizations_url":"https://api.github.com/users/ocombe/orgs","repos_url":"https://api.github.com/users/ocombe/repos","events_url":"https://api.github.com/users/ocombe/events{/privacy}","received_events_url":"https://api.github.com/users/ocombe/received_events","type":"User","site_admin":false},"created_at":"2015-02-26T14:35:42Z","updated_at":"2015-02-26T14:35:42Z","body":"Never mind I got the bug again :(\r\nI don't understand why it is so random... back to 1.9.1 then :)"}}