Changed logic around reserving wire read buffer

This commit is contained in:
Alex Sergeyev 2015-06-16 21:21:22 -04:00
parent 416c39c6e9
commit 387c041985
1 changed files with 1 additions and 1 deletions

View File

@ -194,7 +194,7 @@ func (co *Conn) ReadMsg() (*Msg, error) {
if _, ok := co.Conn.(*net.TCPConn); ok {
p = make([]byte, MaxMsgSize)
} else {
if co.UDPSize >= 512 {
if co.UDPSize > MinMsgSize {
p = make([]byte, co.UDPSize)
} else {
p = make([]byte, MinMsgSize)