Close previous request channels when during initial retry (#1409)

So we don't leave abandoned requests hanging on the media instance
This commit is contained in:
David Zhao
2023-02-09 17:27:33 -08:00
committed by GitHub
parent aebec26ace
commit 9a7ea7a2fa
5 changed files with 143 additions and 0 deletions
+2
View File
@@ -20,6 +20,7 @@ import (
//counterfeiter:generate . MessageSink
type MessageSink interface {
WriteMessage(msg proto.Message) error
IsClosed() bool
Close()
}
@@ -27,6 +28,7 @@ type MessageSink interface {
type MessageSource interface {
// ReadChan exposes a one way channel to make it easier to use with select
ReadChan() <-chan proto.Message
IsClosed() bool
Close()
}