c, err := l.Accept()
desc := netpoll.Must(netpoll.HandleRead(c))
poller.Start(desc, func(ev netpoll.Event) {
if ev&netpoll.EventHup != 0 || ev&netpoll.EventErr != 0 {
// close etc
}
go doSomething(c)
}
Why the code above doesn't "catch" connection error (eg. timeout)?
Also - when I close connection c inside doSomething(c) - the poller doesn't seem to catch that either - which leads me to a question - how to stop poller on error inside doSomething()?
Why the code above doesn't "catch" connection error (eg. timeout)?
Also - when I close connection c inside doSomething(c) - the poller doesn't seem to catch that either - which leads me to a question - how to stop poller on error inside doSomething()?