You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting this error in chrome with my fallback "socket", using xhr polling.
This "fake socket" create a GET request and keep it alive to send information like a stream.
After around 10 seconds chrome give this error and drops the connection.
I'm putting the JS request library here to test xhrrequest.zip
How to use:
let req = new xhrRequest(Object.assign({timeout: 60000 }))
req.ondata = function (data){
console.log(data)
}
req.get("http://127.0.0.1:8080/", function(err, data) {
if (err) console.log(err)
})
The response from backend is something like this:
var headers= {
"connection": "Keep-Alive",
"Keep-Alive": "timeout=0",
}
res.writeStatus(status + " OK")
for (var i in headers) {
res.writeHeader(i, headers[i])
}
var timer = setInterval(()=>{
res.write("block info");
},1000}
var timer = setTimeout(()=>{
clearInterval(timer)
res.end();
},30000}
This discussion was converted from issue #306 on December 09, 2020 05:35.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm getting this error in chrome with my fallback "socket", using xhr polling.
This "fake socket" create a GET request and keep it alive to send information like a stream.
After around 10 seconds chrome give this error and drops the connection.
I'm putting the JS request library here to test
xhrrequest.zip
How to use:
The response from backend is something like this:
Perhaps, the problem is related to this
https://tools.ietf.org/html/rfc7230#section-4.1
Beta Was this translation helpful? Give feedback.
All reactions