fix(raft): should check header of snapshot request

with: #1000100262

Signed-off-by: JasonHu520 <huzongchao@oppo.com>
This commit is contained in:
JasonHu520 2025-05-16 11:19:54 +08:00 committed by slasher
parent 6506cab835
commit f2bd5dc417

View File

@ -177,7 +177,7 @@ func (t *Transport) RaftSnapshot(resp rpc2.ResponseWriter, req *rpc2.Request) er
if err != nil {
return err
}
if rs == nil {
if rs.Header == nil {
return stream.Send(&RaftSnapshotResponse{
Status: RaftSnapshotResponse_ERROR,
Message: "snapshot sender error: no header in the first snapshot request",