Skip to content

Commit

Permalink
Don't set poller.fd twice in newFdPoller
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tklauser committed Jan 14, 2022
1 parent af855d7 commit 7193483
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion inotify_poller.go
Expand Up @@ -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)
Expand Down

0 comments on commit 7193483

Please sign in to comment.