fixed really nasty bug, requestTransaction was called synchronously

This commit is contained in:
Kevin Jahns
2015-07-17 15:04:00 +02:00
parent 4563ccc98e
commit ebc628adfc
7 changed files with 99 additions and 14 deletions

View File

@@ -37,6 +37,7 @@ function flushOne(){
return false;
}
}
// setInterval(flushOne, 10);
var userIdCounter = 0;
@@ -64,6 +65,13 @@ class Test extends AbstractConnector {
disconnect () {
globalRoom.removeUser(this.userId);
}
flush() {
var buff = globalRoom.buffers[this.userId];
while (buff.length > 0) {
var m = buff.shift();
this.receiveMessage(m[0], m[1]);
}
}
flushAll () {
var c = true;
while (c) {