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 = nbuf;
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
@ -207,7 +207,7 @@ function wsWatcher(conn, session) {
|
|||
session.removeListener('data', dataH);
|
||||
session.removeListener('exit', exitH);
|
||||
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({
|
||||
"t": "w", "w": session.w, "h": session.h,
|
||||
|
|
@ -936,7 +936,7 @@ function wsHandler(wsRequest) {
|
|||
var tsession = sessions[watchmatch[1]];
|
||||
var conn = wsRequest.accept(null, wsRequest.origin);
|
||||
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) {
|
||||
wsStart(wsRequest);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue