8000 Release 1.5.1: don't deliver events for unregistered fds (#341) · imcotton/swift-nio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

1.5.1

  • 1.5.1
  • 902b18d
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
  • Compare
    Choose a tag to compare
  • 1.5.1
  • 902b18d
  • Compare
    Choose a tag to compare
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@weissi weissi tagged this 20 Apr 15:19
Motivation:

Since forever we had a major bug in the Selector: In this condition:

- kqueue/epoll had many events
- in one of the earlier events we unregister a Channel whose fd is on of
  the later events
- we subsequently (still in the same event loop tick) register a new
  channel which gets the same fd as the previously closed one

then we would deliver an event that was meant for a previous channel to
a newly opened one.

Thanks to @mcdappdev for hitting this bug, helping us debug it and also
providing a repeatedly working repro.

Modifications:

if during event delivery any fd gets unregistered, we stop delivering
the remaining events and rely on the selector to redeliver them
again next time.

Result:

we don't deliver events for previously closed channels to new ones.
Assets 2
Loading
0