Skip to content

Commit

Permalink
fix: abort handle for gql
Browse files Browse the repository at this point in the history
  • Loading branch information
darkskygit committed Feb 18, 2025
1 parent 8b37649 commit e98449c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,11 @@ export class CopilotContextResolver {

private getSignal(req: Request) {
const controller = new AbortController();
req.on('close', () => controller.abort());
req.socket.on('close', hasError => {
if (hasError) {
controller.abort();
}
});
return controller.signal;
}

Expand Down

0 comments on commit e98449c

Please sign in to comment.