Skip to content

Commit

Permalink
fix(transport): Use connection in WebSocket ID (openwallet-foundation…
Browse files Browse the repository at this point in the history
…#1551)

Signed-off-by: Martin Auer <martin.auer97@gmail.com>
  • Loading branch information
AlexanderShenshin authored and auer-martin committed Nov 15, 2023
1 parent 509b3e6 commit 02222b6
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 02222b6

Please sign in to comment.