fix: TelepathyTransport.ToString UWP exception

This commit is contained in:
vis2k 2019-06-25 10:34:12 +02:00
parent c4a18cd8a4
commit 8a190bfd17

View File

@ -146,7 +146,15 @@ public override string ToString()
{
if (server.Active && server.listener != null)
{
return "Telepathy Server port: " + server.listener.LocalEndpoint;
// printing server.listener.LocalEndpoint causes an Exception
// in UWP + Unity 2019:
// Exception thrown at 0x00007FF9755DA388 in UWF.exe:
// Microsoft C++ exception: Il2CppExceptionWrapper at memory
// location 0x000000E15A0FCDD0. SocketException: An address
// incompatible with the requested protocol was used at
// System.Net.Sockets.Socket.get_LocalEndPoint ()
// so let's use the regular port instead.
return "Telepathy Server port: " + port;
}
else if (client.Connecting || client.Connected)
{