1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 10:08:15 -05:00

don't write empty payload

This commit is contained in:
Darien Raymond 2018-09-01 22:02:45 +02:00
parent 475ffc8196
commit 60ee80ca1b
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -319,6 +319,10 @@ func (w *AuthenticationWriter) writePacket(mb buf.MultiBuffer) error {
mb2Write.Append(eb) mb2Write.Append(eb)
} }
if mb2Write.IsEmpty() {
return nil
}
return w.writer.WriteMultiBuffer(mb2Write) return w.writer.WriteMultiBuffer(mb2Write)
} }