Skip to content

Commit

Permalink
fix: stop subscribe query runner after client disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
mattayres committed Aug 17, 2022
1 parent 872adf7 commit cb61b7d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/services/v1/query_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,11 @@ func (runner *SubscribeQueryRunner) Run(ctx context.Context, tx transaction.Tx,
if ep.Code != 1004 && ep.Code != 1031 && ulog.E(err) {
return nil, ctx, err
}

// check for client disconnect
if runner.streaming.Context().Err() != nil {
break
}
}

return &Response{}, ctx, nil
Expand Down

0 comments on commit cb61b7d

Please sign in to comment.