Browse Source

don't write empty payload

Darien Raymond 7 years ago
parent
commit
60ee80ca1b
1 changed files with 4 additions and 0 deletions
  1. 4 0
      common/crypto/auth.go

+ 4 - 0
common/crypto/auth.go

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