Skip to content

Commit

Permalink
fix(ges): onFinished once
Browse files Browse the repository at this point in the history
  • Loading branch information
edvardchen committed Sep 18, 2019
1 parent c7be571 commit 15adc79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/grpc-experimental-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class Context {
constructor(public call: ServerCall, public definition: MethodDefinition<unknown, unknown>) {}
onFinished(listener: (err: Error | null) => void): void {
const emitter = this.call as EventEmitter;
emitter.on('finish', listener).on('error', listener);
emitter.once('finish', listener).once('error', listener);
}
}

Expand Down

0 comments on commit 15adc79

Please sign in to comment.