Skip to content
This repository was archived by the owner on Mar 10, 2024. It is now read-only.

Commit 19b0565

Browse files
author
bhasher
committed
BugFix line update & packets time logs
1 parent a6dcc3c commit 19b0565

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

src/publics/js/dev/page/editor/linesManager.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ export default class LinesManager{
139139
differences.push(['set', [line.uuid, line.content]]);
140140
}
141141
}else{
142-
if(line.uuid in last_requests) differences.push(['set', [line.uuid, line.content]]);
142+
if(line.uuid in last_requests){
143+
if(line.content !== last_requests[line.uuid]) differences.push(['set', [line.uuid, line.content]]);
144+
}
143145
else differences.push(['new', [line.uuid, this.history.get(-1)[i-1].uuid, line.content]]);
144146
}
145147
}

src/publics/js/dev/utils/stack.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export class WaitingStack{
8989
content['server'] = server_time;
9090
content['received'] = time ? time: Date.now();
9191
this.old.push(content);
92+
return content;
9293
}
9394

9495
/**

src/publics/js/dev/utils/websocket/socket.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export default class Socket{
140140
if(code !== 'OK'){
141141
Debug.warn(`${uuid} come back with a non OK code.`)
142142
}
143-
144-
this.waitingStack.archive(uuid, time);
143+
const element = this.waitingStack.archive(uuid, time);
144+
Debug.debug(`up: ${element.server - element.send}ms, down: ${element.received - element.server}ms`);
145145
}
146146
}

src/publics/js/dist/base.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)