don't write empty payload

pull/1269/head v3.38
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
1 changed files with 4 additions and 0 deletions

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)
} }