mirror of
https://github.com/golang/go
synced 2024-11-20 06:44:40 -07:00
net: update for error (linux)
R=adg CC=golang-dev https://golang.org/cl/5303091
This commit is contained in:
parent
f1b64aa758
commit
f7b7338ec2
@ -98,12 +98,12 @@ func (p *pollster) StopWaiting(fd int, bits uint) {
|
|||||||
p.ctlEvent.Fd = int32(fd)
|
p.ctlEvent.Fd = int32(fd)
|
||||||
p.ctlEvent.Events = events
|
p.ctlEvent.Events = events
|
||||||
if e := syscall.EpollCtl(p.epfd, syscall.EPOLL_CTL_MOD, fd, &p.ctlEvent); e != 0 {
|
if e := syscall.EpollCtl(p.epfd, syscall.EPOLL_CTL_MOD, fd, &p.ctlEvent); e != 0 {
|
||||||
print("Epoll modify fd=", fd, ": ", os.Errno(e).String(), "\n")
|
print("Epoll modify fd=", fd, ": ", os.Errno(e).Error(), "\n")
|
||||||
}
|
}
|
||||||
p.events[fd] = events
|
p.events[fd] = events
|
||||||
} else {
|
} else {
|
||||||
if e := syscall.EpollCtl(p.epfd, syscall.EPOLL_CTL_DEL, fd, nil); e != 0 {
|
if e := syscall.EpollCtl(p.epfd, syscall.EPOLL_CTL_DEL, fd, nil); e != 0 {
|
||||||
print("Epoll delete fd=", fd, ": ", os.Errno(e).String(), "\n")
|
print("Epoll delete fd=", fd, ": ", os.Errno(e).Error(), "\n")
|
||||||
}
|
}
|
||||||
delete(p.events, fd)
|
delete(p.events, fd)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user