From c41b00ccfa37d660fdeb2527eb7670d5ab2fd167 Mon Sep 17 00:00:00 2001 From: Muaz Ahmad Date: Sat, 23 Sep 2023 16:37:49 +0500 Subject: [PATCH] handle ts segment write errors --- srt/protocol.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/srt/protocol.go b/srt/protocol.go index 47cc157..50c8ef6 100644 --- a/srt/protocol.go +++ b/srt/protocol.go @@ -299,7 +299,9 @@ func (agent *SRTManager) handle_data_storage(packet *Packet) { agent.storage.Relink(packet.timestamp) } // write out all possible packets - agent.storage.Expunge(agent.output) + if err := agent.storage.Expunge(agent.output); err != nil { + agent.state = 4 + } } // determines appropriate packets and responses depending on tunnel state