Skip to content

Commit 7560c63

Browse files
committed
Bug Fix - Server crashes in case of wrong number of args
1 parent 37fb245 commit 7560c63

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

internal/server/ironhawk/iothread.go

+9-4
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,16 @@ func (t *IOThread) Start(ctx context.Context, shardManager *shardmanager.ShardMa
6868
Message: err.Error(),
6969
},
7070
}
71-
} else {
72-
res.Rs.Status = wire.Status_OK
73-
if res.Rs.Message == "" {
74-
res.Rs.Message = "OK"
71+
if sendErr := t.serverWire.Send(ctx, res.Rs); sendErr != nil {
72+
return sendErr.Unwrap()
7573
}
74+
// Continue in case of error
75+
continue
76+
}
77+
78+
res.Rs.Status = wire.Status_OK
79+
if res.Rs.Message == "" {
80+
res.Rs.Message = "OK"
7681
}
7782

7883
// TODO: Optimize this. We are doing this for all command execution

0 commit comments

Comments
 (0)