Now supported setting the host parameter on the websocket connection

This commit is contained in:
Josh-Larson
2022-07-06 16:08:58 -05:00
parent f892d4beea
commit f529151697
2 changed files with 2 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ sourceSets {
implementation(group="org.jetbrains", name="annotations", version="20.1.0")
implementation(project(":pswgcommon"))
api(group="me.joshlarson", name="jlcommon-network", version="1.1.1")
implementation(group="me.joshlarson", name="websocket", version="0.9.3")
implementation(group="me.joshlarson", name="websocket", version="0.9.5")
}
}
test {

View File

@@ -140,7 +140,7 @@ class HolocoreConnection(private val intentManager: IntentManager,
Log.t("Received login packet - upgrading to websocket")
connectionUri = forwarderData.connectionUri
outputStream = socket.getOutputStream()
wsProtocol = WebSocketClientProtocol(WebsocketHandler(), connectionUri.rawPath + "?" + connectionUri.rawQuery, ::writeToOutputStream, socket::close)
wsProtocol = WebSocketClientProtocol(WebsocketHandler(), connectionUri.rawPath + "?" + connectionUri.rawQuery, initialConnectionUri.host, ::writeToOutputStream, socket::close)
return true
}