Properly print session tags in the log.
They are Strings and should not be formatted with %d.
This commit is contained in:
parent
b7eb9ef98a
commit
7e294b2136
1 changed files with 3 additions and 3 deletions
|
|
@ -161,7 +161,7 @@ function TermSession(game, lkey, dims, handlers) {
|
||||||
this.framebuf.copy(nbuf, 0, 0, this.frameoff);
|
this.framebuf.copy(nbuf, 0, 0, this.frameoff);
|
||||||
this.framebuf = nbuf;
|
this.framebuf = nbuf;
|
||||||
if (this.framebuf.length > 65536) {
|
if (this.framebuf.length > 65536) {
|
||||||
tslog("Warning: Game %d frame buffer at %d bytes", this.tag(),
|
tslog("Warning: Game %s frame buffer at %d bytes", this.tag(),
|
||||||
this.framebuf.length);
|
this.framebuf.length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -207,7 +207,7 @@ function wsWatcher(conn, session) {
|
||||||
session.removeListener('data', dataH);
|
session.removeListener('data', dataH);
|
||||||
session.removeListener('exit', exitH);
|
session.removeListener('exit', exitH);
|
||||||
if (session.tag() in sessions)
|
if (session.tag() in sessions)
|
||||||
tslog("A WebSocket watcher has left game %d", session.tag());
|
tslog("A WebSocket watcher has left game %s", session.tag());
|
||||||
});
|
});
|
||||||
conn.sendUTF(JSON.stringify({
|
conn.sendUTF(JSON.stringify({
|
||||||
"t": "w", "w": session.w, "h": session.h,
|
"t": "w", "w": session.w, "h": session.h,
|
||||||
|
|
@ -936,7 +936,7 @@ function wsHandler(wsRequest) {
|
||||||
var tsession = sessions[watchmatch[1]];
|
var tsession = sessions[watchmatch[1]];
|
||||||
var conn = wsRequest.accept(null, wsRequest.origin);
|
var conn = wsRequest.accept(null, wsRequest.origin);
|
||||||
new wsWatcher(conn, tsession);
|
new wsWatcher(conn, tsession);
|
||||||
tslog("Game %d is being watched via WebSockets", tsession.tag());
|
tslog("Game %s is being watched via WebSockets", tsession.tag());
|
||||||
}
|
}
|
||||||
else if (playmatch !== null) {
|
else if (playmatch !== null) {
|
||||||
wsStart(wsRequest);
|
wsStart(wsRequest);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue