Skip to content

Commit

Permalink
fix: TelepathyTransport.ToString UWP exception
Browse files Browse the repository at this point in the history
  • Loading branch information
miwarnec committed Jun 25, 2019
1 parent c4a18cd commit 8a190bf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Assets/Mirror/Runtime/Transport/TelepathyTransport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 8a190bf

Please sign in to comment.