From 82beea94d52e22abd409fda08d3ac3b5929ff045 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Sat, 6 May 2017 23:43:55 +0200 Subject: [PATCH] rpc: missing response header for InitialTransferRequest --- rpc/rpc.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rpc/rpc.go b/rpc/rpc.go index ebc42f4..8e401ce 100644 --- a/rpc/rpc.go +++ b/rpc/rpc.go @@ -158,6 +158,15 @@ func ListenByteStreamRPC(conn io.ReadWriteCloser, handler RPCHandler) error { respondWithError(encoder, EHandler, err) return conn.Close() } else { + + r := ResponseHeader{ + RequestId: header.Id, + ResponseType: RChunkedStream, + } + if err := encoder.Encode(&r); err != nil { + panic(err) + } + chunker := NewChunker(snapReader) _, err := io.Copy(conn, &chunker) if err != nil {