From 71934831fca139656fc2266de1793da28d4fadff Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 10 Dec 2021 15:46:06 +0100 Subject: [PATCH] Don't set poller.fd twice in newFdPoller 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. --- inotify_poller.go | 1 - 1 file changed, 1 deletion(-) diff --git a/inotify_poller.go b/inotify_poller.go index e9ff9439..b572a37c 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)