diff --git a/common/net/transport.go b/common/net/transport.go index 374317e0b..01b8c754a 100644 --- a/common/net/transport.go +++ b/common/net/transport.go @@ -11,6 +11,9 @@ const ( func ReadFrom(reader io.Reader) ([]byte, error) { buffer := make([]byte, bufferSize) nBytes, err := reader.Read(buffer) + if nBytes == 0 { + buffer = nil + } return buffer[:nBytes], err }