Skip to content

Commit

Permalink
Merge branch 'develop' into ship-hedera
Browse files Browse the repository at this point in the history
  • Loading branch information
simsonraj authored Jun 10, 2024
2 parents 6cd388c + f2680ad commit 0413603
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/capabilities/remote/target/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ func (r *server) expireRequests() {
func (r *server) Receive(msg *types.MessageBody) {
r.receiveLock.Lock()
defer r.receiveLock.Unlock()
ctx, _ := r.stopCh.NewCtx()

if msg.Method != types.MethodExecute {
r.lggr.Errorw("received request for unsupported method type", "method", msg.Method)
Expand All @@ -137,7 +136,11 @@ func (r *server) Receive(msg *types.MessageBody) {

req := r.requestIDToRequest[requestID]

r.wg.Add(1)
go func() {
defer r.wg.Done()
ctx, cancel := r.stopCh.NewCtx()
defer cancel()
err := req.OnMessage(ctx, msg)
if err != nil {
r.lggr.Errorw("request failed to OnMessage new message", "request", req, "err", err)
Expand Down

0 comments on commit 0413603

Please sign in to comment.