Skip to content

Commit

Permalink
#
Browse files Browse the repository at this point in the history
  • Loading branch information
mc373906408 committed Nov 17, 2023
1 parent dec28a4 commit 903c513
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Network/UdpServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ Session::Ptr UdpServer::createSession(const PeerIdType &id, const Buffer::Ptr &b
//收到非本peer fd的数据,让server去派发此数据到合适的session对象
strong_self->onRead_l(false, id, buf, addr, addr_len);
});
socket->setOnErr([weak_self, weak_session, id, cls](const SockException &err) {
socket->setOnErr([weak_self, weak_session, id, cls,this](const SockException &err) {
// 在本函数作用域结束时移除会话对象
// 目的是确保移除会话前执行其 onError 函数
// 同时避免其 onError 函数抛异常时没有移除会话对象
Expand Down

0 comments on commit 903c513

Please sign in to comment.