Skip to content

Commit 910da8e

Browse files
committed
netstack/forwarders: set panic on fault
1 parent d643f97 commit 910da8e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

intra/netstack/forwarders.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
"encoding/binary"
2828
"fmt"
2929
"math/rand"
30+
"runtime/debug"
3031
"sync"
3132
"time"
3233

@@ -142,6 +143,7 @@ type processor struct {
142143

143144
// start starts the processor goroutine; thread-safe.
144145
func (p *processor) start(wg *sync.WaitGroup) {
146+
debug.SetPanicOnFault(true)
145147
// defer core.RecoverFn("ns.forwaders.start", p.e.notifyRestart)
146148
defer core.Recover(core.Exit11, "ns.forwarder.start")
147149

@@ -169,6 +171,7 @@ func (p *processor) deliverPackets() {
169171
code = core.DontExit
170172
}
171173

174+
debug.SetPanicOnFault(true)
172175
defer core.Recover(code, "ns.forwarder.deliverPackets")
173176

174177
p.mu.Lock()

0 commit comments

Comments
 (0)