perf(backend): use websockets/ws instead of theturtle32/WebSocket-Node (#10884)
* perf(backend): use websockets/ws instead of theturtle32/WebSocket-Node Resolve #10883 * refactor * Update StreamingApiServerService.ts * Update StreamingApiServerService.ts * ✌️ * Update StreamingApiServerService.ts * fix main stream init * fix timing 2 * setIntervalの重複を避ける(気休め) * add comment * ✌️ --------- Co-authored-by: tamaina <tamaina@hotmail.co.jp>
This commit is contained in:
parent
b35b9bc27f
commit
f930eaee02
6 changed files with 107 additions and 108 deletions
|
@ -194,7 +194,7 @@ export class ServerService implements OnApplicationShutdown {
|
|||
|
||||
fastify.register(this.clientServerService.createServer);
|
||||
|
||||
this.streamingApiServerService.attachStreamingApi(fastify.server);
|
||||
this.streamingApiServerService.attach(fastify.server);
|
||||
|
||||
fastify.server.on('error', err => {
|
||||
switch ((err as any).code) {
|
||||
|
@ -224,6 +224,7 @@ export class ServerService implements OnApplicationShutdown {
|
|||
|
||||
@bindThis
|
||||
public async dispose(): Promise<void> {
|
||||
await this.streamingApiServerService.detach();
|
||||
await this.#fastify.close();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue