MatchMakeException only in Unity3D Colyseus client

Hi I have developed my complete game flow with Cocos creator but when I am trying the same with Unity getting this error while joining a room on remote server. But the same Unity client is also working with local server, (not with remote server).

And Javascript client is working with both.

Please help me figure out whats happening.

MatchMakeException: Unable to connect to the remote server
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () (at <1f0c1ef1ad524c38bbc5536809c46b48>:0) Colyseus.Client+<ConsumeSeatReservation>d__151[T].MoveNext () (at Assets/Plugins/Colyseus/Client.cs:188)
--- End of stack trace from previous location where exception was thrown ---

Please check the attached Wireshark screenshots for

  1. Unity to Remote Server : (FIN) flag and then RST
  2. Cocos Creator to Remote Server : Working as expected.!

1_1600009585249_Unity 2 Remote Server.png 0_1600009585249_Cocos Creator 2 Remote Server.png

Found the issue.
SSL was not the problem .Unity client is replacing the existing path in url when joining a room.

Fixed it by adding existing path in CreateConnection method of Client.cs class
UriBuilder uriBuilder = new UriBuilder(Endpoint.Uri)
Path = Endpoint.Path + path, //earlier it was just path
Query = string.Join("&", list.ToArray())