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)