Skip to content

Commit

Permalink
chore: address feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Glastra <[email protected]>
  • Loading branch information
TimoGlastra committed May 1, 2022
1 parent 31c8dd6 commit 11feb8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/transport/SubjectOutboundTransport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { InjectionSymbols, AriesFrameworkError } from '../../packages/core/src'
export class SubjectOutboundTransport implements OutboundTransport {
private logger!: Logger
private ourSubject = new Subject<SubjectMessage>()
private subscription?: Subscription
private returnRouteMessageSubscription?: Subscription
private subjectMap: { [key: string]: Subject<SubjectMessage> | undefined }

public supportedSchemes = ['rxjs']
Expand All @@ -26,12 +26,12 @@ export class SubjectOutboundTransport implements OutboundTransport {
}

public async stop(): Promise<void> {
this.subscription?.unsubscribe()
this.returnRouteMessageSubscription?.unsubscribe()
this.ourSubject.complete()
}

private subscribe(agent: Agent) {
this.subscription = this.ourSubject.subscribe({
this.returnRouteMessageSubscription = this.ourSubject.subscribe({
next: async ({ message }: SubjectMessage) => {
this.logger.test('Received message')

Expand Down

0 comments on commit 11feb8b

Please sign in to comment.