Skip to content

Commit 1cb6e52

Browse files
committed
add case for those who fixed url
1 parent 8253f73 commit 1cb6e52

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Scripts/Connection/WSConnector.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,14 @@ public TextMessage(string text)
174174
/// <returns>The fixed up URL.</returns>
175175
public static string FixupURL(string URL)
176176
{
177-
if (URL.StartsWith("http://stream"))
178-
URL = URL.Replace("http://stream", "ws://stream-tls10");
179-
else if (URL.StartsWith("https://stream"))
180-
URL = URL.Replace("https://stream", "wss://stream-tls10");
177+
if (URL.StartsWith("http://stream."))
178+
URL = URL.Replace("http://stream.", "ws://stream-tls10.");
179+
else if (URL.StartsWith("https://stream."))
180+
URL = URL.Replace("https://stream.", "wss://stream-tls10.");
181+
else if (URL.StartsWith("http://stream-tls10."))
182+
URL = URL.Replace("http://stream-tls10.", "ws://stream-tls10.");
183+
else if (URL.StartsWith("https://stream-tls10."))
184+
URL = URL.Replace("https://stream-tls10.", "wss://stream-tls10.");
181185

182186
return URL;
183187
}

0 commit comments

Comments
 (0)