Handshake should be using the endpoint store, not the config store

This commit is contained in:
nathan 2020-09-16 15:52:14 +02:00
parent f9623a616c
commit b9c0e6b29f

View File

@ -115,7 +115,7 @@ internal class ClientHandshake<CONNECTION: Connection>(private val config: Confi
// called from the connect thread
suspend fun handshakeHello(handshakeConnection: MediaDriverConnection, connectionTimeoutMS: Long) : ClientConnectionInfo {
val registrationMessage = HandshakeMessage.helloFromClient(oneTimePad, config.settingsStore.getPublicKey()!!)
val registrationMessage = HandshakeMessage.helloFromClient(oneTimePad, endPoint.settingsStore.getPublicKey()!!)
// Send the one-time pad to the server.
endPoint.writeHandshakeMessage(handshakeConnection.publication, registrationMessage)