Skip to content

Commit

Permalink
fix: stopped recvRequest from receiving outbound messages (#1786)
Browse files Browse the repository at this point in the history
Signed-off-by: wadeking98 <[email protected]>
  • Loading branch information
wadeking98 authored Mar 2, 2024
1 parent add7e09 commit 2005566
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/drpc/src/DrpcApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
} from '@credo-ts/core'

import { DrpcRequestHandler, DrpcResponseHandler } from './handlers'
import { DrpcRole } from './models'
import { DrpcService } from './services'

@injectable()
Expand Down Expand Up @@ -109,7 +110,7 @@ export class DrpcApi {
removeListener: () => void
}) => {
const request = drpcMessageRecord.request
if (request) {
if (request && drpcMessageRecord.role === DrpcRole.Server) {
removeListener()
resolve({
sendResponse: async (response: DrpcResponse) => {
Expand Down

0 comments on commit 2005566

Please sign in to comment.