rpc: missing response header for InitialTransferRequest

This commit is contained in:
Christian Schwarz 2017-05-06 23:43:55 +02:00
parent 61c263b91d
commit 82beea94d5

View File

@ -158,6 +158,15 @@ func ListenByteStreamRPC(conn io.ReadWriteCloser, handler RPCHandler) error {
respondWithError(encoder, EHandler, err) respondWithError(encoder, EHandler, err)
return conn.Close() return conn.Close()
} else { } else {
r := ResponseHeader{
RequestId: header.Id,
ResponseType: RChunkedStream,
}
if err := encoder.Encode(&r); err != nil {
panic(err)
}
chunker := NewChunker(snapReader) chunker := NewChunker(snapReader)
_, err := io.Copy(conn, &chunker) _, err := io.Copy(conn, &chunker)
if err != nil { if err != nil {