Skip to content

Commit

Permalink
chore(context): make sure invocation context is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondfeng committed Apr 23, 2019
1 parent a343b54 commit 1cd6eea
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/context/src/interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,12 @@ export function invokeMethodWithInterceptors(
);

assertMethodExists(invocationCtx);
const interceptors = loadInterceptors(invocationCtx);
return invokeInterceptors(invocationCtx, interceptors);
try {
const interceptors = loadInterceptors(invocationCtx);
return invokeInterceptors(invocationCtx, interceptors);
} finally {
invocationCtx.close();
}
}

/**
Expand Down

0 comments on commit 1cd6eea

Please sign in to comment.