mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
@@ -174,15 +174,12 @@ namespace ArchiSteamFarm {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASF.ArchiLogger.LogGenericDebug("Checking for websockets support!");
|
|
||||||
if (globalConfig.SteamProtocols.HasFlag(ProtocolTypes.WebSocket) && !OS.SupportsWebSockets()) {
|
if (globalConfig.SteamProtocols.HasFlag(ProtocolTypes.WebSocket) && !OS.SupportsWebSockets()) {
|
||||||
ASF.ArchiLogger.LogGenericDebug("Disabling websockets!");
|
|
||||||
globalConfig.SteamProtocols &= ProtocolTypes.WebSocket;
|
globalConfig.SteamProtocols &= ProtocolTypes.WebSocket;
|
||||||
if (globalConfig.SteamProtocols == 0) {
|
if (globalConfig.SteamProtocols == 0) {
|
||||||
globalConfig.SteamProtocols = ProtocolTypes.Tcp;
|
globalConfig.SteamProtocols = ProtocolTypes.Tcp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ASF.ArchiLogger.LogGenericDebug("Done!");
|
|
||||||
|
|
||||||
GlobalConfig result = globalConfig;
|
GlobalConfig result = globalConfig;
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -50,13 +50,9 @@ namespace ArchiSteamFarm {
|
|||||||
internal static bool SupportsWebSockets() {
|
internal static bool SupportsWebSockets() {
|
||||||
try {
|
try {
|
||||||
using (new ClientWebSocket()) {
|
using (new ClientWebSocket()) {
|
||||||
ASF.ArchiLogger.LogGenericDebug("Inside using!");
|
|
||||||
new ClientWebSocket().Dispose();
|
|
||||||
ASF.ArchiLogger.LogGenericDebug("Returning true!");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch (PlatformNotSupportedException) {
|
} catch (PlatformNotSupportedException) {
|
||||||
ASF.ArchiLogger.LogGenericDebug("Returning false!");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user