Skip to content

Commit

Permalink
fix(transport): Use connection in WebSocket ID
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderShenshin committed Aug 24, 2023
1 parent 93276de commit a852522
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/core/src/transport/WsOutboundTransport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ export class WsOutboundTransport implements OutboundTransport {
throw new AriesFrameworkError("Missing connection or endpoint. I don't know how and where to send the message.")
}

const isNewSocket = !this.hasOpenSocket(endpoint)
const socket = await this.resolveSocket({ socketId: endpoint, endpoint, connectionId })
const socketId = `${endpoint}-${connectionId}`
const isNewSocket = !this.hasOpenSocket(socketId)
const socket = await this.resolveSocket({ socketId, endpoint, connectionId })

socket.send(Buffer.from(JSON.stringify(payload)))

Expand Down

0 comments on commit a852522

Please sign in to comment.