Skip to content

Commit

Permalink
worker: fix Handler writes multiple responses
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjan committed Nov 20, 2023
1 parent 5e419f8 commit 34c9332
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ func (w *worker) slabMigrateHandler(jc jape.Context) {

// migrate the slab
numShardsMigrated, surchargeApplied, err := migrateSlab(ctx, w.downloadManager, w.uploadManager, &slab, dlContracts, ulContracts, up.CurrentHeight, w.logger)
if jc.Check("couldn't migrate slabs", err) != nil {
if err != nil {
jc.Encode(api.MigrateSlabResponse{
NumShardsMigrated: numShardsMigrated,
SurchargeApplied: surchargeApplied,
Expand Down

0 comments on commit 34c9332

Please sign in to comment.