Skip to content

Commit 93b56eb

Browse files
committed
fix(WSConnector): Do not use TLS 1.2 or TLS 1.1 if we are not using .NET 4.x
1 parent 34a1a43 commit 93b56eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Scripts/Connection/WSConnector.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,10 @@ private void SendMessages()
414414
ws.OnClose += OnWSClose;
415415
ws.OnError += OnWSError;
416416
ws.OnMessage += OnWSMessage;
417-
#if UNITY_2018_2_OR_NEWER
417+
#if NET_4_6
418418
ws.SslConfiguration.EnabledSslProtocols = SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls;
419+
#else
420+
ws.SslConfiguration.EnabledSslProtocols = SslProtocols.Tls;
419421
#endif
420422
ws.Connect();
421423

0 commit comments

Comments
 (0)