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