diff --git a/src/Network/Socket.cpp b/src/Network/Socket.cpp index 64a038f2..26a85a45 100644 --- a/src/Network/Socket.cpp +++ b/src/Network/Socket.cpp @@ -276,7 +276,11 @@ bool Socket::attachEvent(const SockNum::Ptr &sock) { strong_self->onWriteAble(sock); } if (event & EventPoller::Event_Error) { - strong_self->emitErr(getSockErr(sock->rawFd())); + if (sock->type() == SockNum::Sock_UDP) { + // udp ignore error + } else { + strong_self->emitErr(getSockErr(sock->rawFd())); + } } });