Skip to content

Commit e44ca94

Browse files
authoredApr 29, 2020
fix(client): flush resultsBuffer on engine upgrade (#3212)
Fixes #3211
1 parent f9ef33a commit e44ca94

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎client/karma.js

+5
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,11 @@ function Karma (socket, iframe, opener, navigator, location, document) {
288288
socket.on('connect', function () {
289289
socket.io.engine.on('upgrade', function () {
290290
resultsBufferLimit = 1
291+
// Flush any results which were buffered before the upgrade to WebSocket protocol.
292+
if (resultsBuffer.length > 0) {
293+
socket.emit('result', resultsBuffer)
294+
resultsBuffer = []
295+
}
291296
})
292297
var info = {
293298
name: navigator.userAgent,

0 commit comments

Comments
 (0)
Please sign in to comment.