Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(transport): Use connection in WebSocket ID #1551

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading