We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f730757 commit 3d2c8dcCopy full SHA for 3d2c8dc
intra/netstack/fdbased.go
@@ -328,6 +328,12 @@ func (e *endpoint) Attach(dispatcher stack.NetworkDispatcher) {
328
if dispatcher != nil && e.dispatcher == nil {
329
log.I("ns: tun(%d): attach: new dispatcher & looper", fd)
330
e.dispatcher = dispatcher
331
+ if e.inboundDispatcher == nil && fd != invalidfd { // unlikely
332
+ var err error
333
+ e.inboundDispatcher, err = createInboundDispatcher(e, fd)
334
+ logeif(err)("ns: tun(%d): attach: just-in-time createInboundDispatcher; err? %v", fd, err)
335
+ rx = e.inboundDispatcher
336
+ }
337
go e.dispatchLoop(rx)
338
return
339
}
0 commit comments