From: Tobias Klauser Date: Wed, 19 Jan 2022 14:22:52 +0000 (+0100) Subject: Don't set poller.fd twice in newFdPoller (#406) X-Git-Tag: v1.7.2~129 X-Git-Url: https://go.fuhry.dev/?a=commitdiff_plain;h=508ee5e549cd81e65dc770b3b9dd25c7fc147239;p=fsnotify.git Don't set poller.fd twice in newFdPoller (#406) In newEmptyPoller when creating the poller using newEmptyPoller(fd), the fd field of the poller instance is already set. There is no need to set it again. --- diff --git a/inotify_poller.go b/inotify_poller.go index e9ff943..b572a37 100644 --- a/inotify_poller.go +++ b/inotify_poller.go @@ -38,7 +38,6 @@ func newFdPoller(fd int) (*fdPoller, error) { poller.close() } }() - poller.fd = fd // Create epoll fd poller.epfd, errno = unix.EpollCreate1(unix.EPOLL_CLOEXEC)