Skip to content

Commit

Permalink
feat: log request server automatically send an empty message (#1940)
Browse files Browse the repository at this point in the history
  • Loading branch information
nightwhite authored Apr 12, 2024
1 parent ea846df commit 799dfc1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/src/log/log.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,14 @@ export class LogController {

const streamsEnded = new Set<string>()

const timerId = setInterval(() => {
subscriber.next('\u200B' as unknown as MessageEvent)
}, 30000)

const destroyStream = () => {
combinedLogStream?.removeAllListeners()
combinedLogStream?.destroy()
clearInterval(timerId)
}

combinedLogStream.on('data', (chunk) => {
Expand Down

0 comments on commit 799dfc1

Please sign in to comment.