Fix write response for AEAD server

This commit is contained in:
wwqgtxx 2022-11-15 22:07:28 +08:00 committed by GitHub
parent e55284e180
commit 028358027b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -170,7 +170,7 @@ func (c *serverConn) writeResponse(payload []byte) (n int, err error) {
bufferedWriter := writer.BufferedWriter(header.Len())
if len(payload) > 0 {
_, err = bufferedWriter.Write(payload)
n, err = bufferedWriter.Write(payload)
if err != nil {
return
}