discordjs / voice

Implementation of the Discord Voice API for discord.js and other JS/TS libraries
Apache License 2.0
328 stars 112 forks source link

feat(VoiceReceiver): finish streams when they are no longer pushed to #163

Closed iliazeus closed 2 years ago

iliazeus commented 2 years ago

Please describe the changes this PR makes and why it should be merged:

Currently, an AudioReceiveStream will never be considered finished, even when it's guaranteed that no more packets will be pushed there by the library. This makes it harder to use Node stream utilities like stream.pipeline, which wait for the source stream's completion. This PR aims to rectify this.

Status and versioning classification:

amishshah commented 2 years ago

This will be resolved as part of https://github.com/discordjs/voice/pull/136 (where voice receive will be changed quite a bit anyway, breaking this fix), but thank you for the PR anyway :smiley: