From 8dab2af62771496a6ed057e88212f026f7739409 Mon Sep 17 00:00:00 2001 From: Patrick Hellebrand Date: Wed, 22 Sep 2021 16:21:40 +0200 Subject: [PATCH] small fix for correct ip display --- PolyChat/Controller.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PolyChat/Controller.cs b/PolyChat/Controller.cs index 835a540..3180421 100644 --- a/PolyChat/Controller.cs +++ b/PolyChat/Controller.cs @@ -59,7 +59,7 @@ namespace PolyChat socket.On("initial", async (JToken[] data) => { Debug.WriteLine("--- initial packet received ---"); - string ForeignIp = data.ToString(); + string ForeignIp = data[0].ToString(); //Todo deserialize inital packet and extract ip address Connections.Add(ForeignIp, new Connection(socket, Data => OnMessage(ForeignIp, Data))); UIController.OnIncomingConnection(ForeignIp);