From df30d0d8208485fc659fe53d73b4402aec6e8956 Mon Sep 17 00:00:00 2001 From: lesismal Date: Thu, 11 Jul 2024 22:42:33 +0800 Subject: [PATCH] opt epoll et events --- nbhttp/websocket/conn.go | 1 + poller_epoll.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/nbhttp/websocket/conn.go b/nbhttp/websocket/conn.go index b4f6eb71..87d0bac7 100644 --- a/nbhttp/websocket/conn.go +++ b/nbhttp/websocket/conn.go @@ -662,6 +662,7 @@ func (w *writeBuffer) Close() error { // CloseAndClean . func (c *Conn) CloseAndClean(err error) { + // c.WriteClose(1000, "normal close") c.mux.Lock() if c.closed { c.mux.Unlock() diff --git a/poller_epoll.go b/poller_epoll.go index 5039d6b9..cad81d3a 100644 --- a/poller_epoll.go +++ b/poller_epoll.go @@ -342,6 +342,7 @@ func (p *poller) setRead(op int, fd int) error { Events: events | syscall.EPOLLOUT, }) } + return nil } return syscall.EpollCtl(p.epfd, op, fd, &syscall.EpollEvent{ Fd: int32(fd), @@ -390,6 +391,7 @@ func (p *poller) setReadWrite(op int, fd int) error { Events: events, }) } + return nil } return syscall.EpollCtl(p.epfd, op, fd, &syscall.EpollEvent{ Fd: int32(fd),