Skip to content

EventErr #9

Description

@damanloox
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()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions