Skip to content

Commit

Permalink
udp ignore error for the issue ZLMediaKit/ZLMediaKit#3807
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongguangjie committed Sep 14, 2024
1 parent 1b36624 commit 01a0eb6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Network/Socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}
}
});

Expand Down

0 comments on commit 01a0eb6

Please sign in to comment.