tunnel deletion on shutdown fix
This commit is contained in:
parent
fb39b051db
commit
abe6337dc2
1 changed files with 5 additions and 0 deletions
|
@ -24,6 +24,11 @@ func (tunnel *Tunnel) Start() {
|
||||||
// central tunnel loop, read incoming, process and generate response
|
// central tunnel loop, read incoming, process and generate response
|
||||||
// write response if any
|
// write response if any
|
||||||
for {
|
for {
|
||||||
|
// force check since no new packets after shutdown
|
||||||
|
if tunnel.state.state == 3 {
|
||||||
|
tunnel.broken = true
|
||||||
|
break
|
||||||
|
}
|
||||||
packet, err := tunnel.ReadPacket()
|
packet, err := tunnel.ReadPacket()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
|
|
Loading…
Reference in a new issue