From 2444f1b8e2311d0d5664df5282873fa55e294291 Mon Sep 17 00:00:00 2001 From: azw Date: Mon, 24 Apr 2023 08:16:27 +0000 Subject: [PATCH] 1 --- a8/udpsession.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/a8/udpsession.cc b/a8/udpsession.cc index 8f03157..1c1cfc5 100644 --- a/a8/udpsession.cc +++ b/a8/udpsession.cc @@ -5,7 +5,6 @@ #include -static const int DEFAULT_MAX_PACKET_LEN = 1024 * 10; static const int DEFAULT_MAX_RECV_BUFFERSIZE = 1024 * 64; namespace a8 @@ -13,7 +12,7 @@ namespace a8 UdpSession::UdpSession() { - max_packet_len_ = DEFAULT_MAX_PACKET_LEN; + max_packet_len_ = DEFAULT_MAX_RECV_BUFFERSIZE; SetMaxPacketLen(max_packet_len_); } @@ -33,7 +32,7 @@ namespace a8 void UdpSession::SetMaxPacketLen(int max_packet_len) { - max_packet_len_ = std::max(max_packet_len, DEFAULT_MAX_PACKET_LEN); + max_packet_len_ = std::max(max_packet_len, DEFAULT_MAX_RECV_BUFFERSIZE); if (!recv_buff_) { recv_buff_ = (char *)malloc(max_packet_len_ + 1); }