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: Ariel Gentile <gentilester@gmail.com>
  • Loading branch information
AlexanderShenshin authored and genaris committed Sep 22, 2023
1 parent da6b379 commit 5f64f9c
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 5f64f9c

Please sign in to comment.