We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc9295a commit 9aede95Copy full SHA for 9aede95
1 file changed
intra/netstack/forwarders.go
@@ -161,7 +161,6 @@ func (p *processor) start(wg *sync.WaitGroup) {
161
// deliverPackets delivers packets to the endpoint; thread-safe.
162
func (p *processor) deliverPackets() {
163
testpanic := settings.PanicAtRandom.Load() && rand10pc()
164
- testfatal := settings.FatalAtRandom.Load() && rand10pc()
165
if testpanic {
166
defer core.Recover(core.DontExit, "ns.forwarder.deliverPackets")
167
}
@@ -183,8 +182,12 @@ func (p *processor) deliverPackets() {
183
182
184
panic("ns: tun: forwarder: deliverPackets rand10pc")
185
186
- if testfatal {
+ if settings.FatalAtRandom.Load() {
187
core.RuntimeWtf("ns: tun: forwarder: test fatal")
+ if rand10pc() {
188
+ var mu sync.Mutex
189
+ mu.Unlock() // ka-boom
190
+ }
191
192
193
0 commit comments