Skip to content

Commit bf2d3ae

Browse files
author
Hayim.Shaul@ibm.com
committed
return early if empty list to bind
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe3.haifa.ibm.com>
1 parent f116416 commit bf2d3ae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

platform/view/services/endpoint/service.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ func (r *Service) Bind(ctx context.Context, longTerm view.Identity, ephemeralIDs
154154
toBind = append(toBind, id)
155155
}
156156
}
157+
if len(toBind) == 0 {
158+
return nil
159+
}
157160
if err := r.bindingKVS.PutBindings(ctx, longTerm, toBind...); err != nil {
158161
return errors.WithMessagef(err, "failed storing bindings")
159162
}

0 commit comments

Comments
 (0)