cvm-rs: merge guac and jpeg libs together into one

doesn't really need to be two seperate libraries. also preperation for other funnies

the build script has been replaced with a much saner justfile which uses much saner "yarn workspace" invocations instead of blindly cding all over the place
This commit is contained in:
modeco80
2024-06-22 21:14:05 -04:00
parent 87a377a10f
commit b8ed177885
26 changed files with 246 additions and 414 deletions

View File

@@ -49,7 +49,14 @@ export default class WSClient extends EventEmitter implements NetworkClient {
}
close(): void {
this.socket.close();
if(this.isOpen()) {
// While this seems counterintutive, do note that the WebSocket protocol
// *sends* a data frame whilist closing a connection. Therefore, if the other end
// has forcibly hung up (closed) their connection, the best way to handle that
// is to just let the inner TCP socket propegate that, which `ws` will do for us.
// Otherwise, we'll try to send data to a closed client then SIGPIPE.
this.socket.close();
}
}
}