From 6f2c442e94b4fdac9dbe3269b9c95ff4bf3e2866 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 1f202e3..099fada 100644 --- a/PolyChat/Controller.cs +++ b/PolyChat/Controller.cs @@ -57,7 +57,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);