From abe6337dc21b15a11f8da013603d609e8450230f Mon Sep 17 00:00:00 2001 From: Muaz Ahmad Date: Sat, 23 Sep 2023 20:44:20 +0500 Subject: [PATCH] tunnel deletion on shutdown fix --- srt/tunnel.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/srt/tunnel.go b/srt/tunnel.go index aa338b8..b93accb 100644 --- a/srt/tunnel.go +++ b/srt/tunnel.go @@ -24,6 +24,11 @@ func (tunnel *Tunnel) Start() { // central tunnel loop, read incoming, process and generate response // write response if any for { + // force check since no new packets after shutdown + if tunnel.state.state == 3 { + tunnel.broken = true + break + } packet, err := tunnel.ReadPacket() if err != nil { fmt.Println(err)