Skip to content

Commit

Permalink
Don't set poller.fd twice in newFdPoller (#406)
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 19, 2022
1 parent c11d74b commit 508ee5e
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 508ee5e

Please sign in to comment.