Skip to content

Commit 47a3549

Browse files
chore(deps): update dependency tmds.dbus.protocol to 0.90.0 (#3542)
* chore(deps): update dependency tmds.dbus.protocol to 0.90.0 * Adapt to breaking changes --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Łukasz Domeradzki <JustArchi@JustArchi.net>
1 parent 270cfcd commit 47a3549

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

ArchiSteamFarm/Core/OS.cs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -283,19 +283,19 @@ private static async Task LinuxKeepSystemActive() {
283283
}
284284

285285
// Docs: https://systemd.io/INHIBITOR_LOCKS
286-
string? systemAddress = Address.System;
286+
string? systemAddress = DBusAddress.System;
287287

288288
if (string.IsNullOrEmpty(systemAddress)) {
289289
ASF.ArchiLogger.LogGenericError(Strings.FormatWarningFailedWithError(nameof(systemAddress)));
290290

291291
return;
292292
}
293293

294-
using Connection connection = new(systemAddress);
294+
using DBusConnection connection = new(systemAddress);
295295

296296
try {
297297
await connection.ConnectAsync().ConfigureAwait(false);
298-
} catch (ConnectException e) {
298+
} catch (DBusConnectionException e) {
299299
// Possible if no DBus is available at all
300300
ASF.ArchiLogger.LogGenericDebuggingException(e);
301301
ASF.ArchiLogger.LogGenericWarning(Strings.WarningNoSystemRequiredLinuxDependencies);
@@ -336,16 +336,10 @@ private static async Task LinuxKeepSystemActive() {
336336
return reader.ReadHandle<SafeFileHandle>();
337337
}
338338
).ConfigureAwait(false);
339-
} catch (DBusException e) {
339+
} catch (DBusMessageException e) {
340340
// Possible if login manager does not support inhibit, although that should be super rare
341341
ASF.ArchiLogger.LogGenericDebuggingException(e);
342342
ASF.ArchiLogger.LogGenericWarning(Strings.WarningNoSystemRequiredLinuxDependencies);
343-
344-
return;
345-
}
346-
347-
if (InhibitLock == null) {
348-
ASF.ArchiLogger.LogGenericError(Strings.FormatWarningFailedWithError(nameof(InhibitLock)));
349343
}
350344
}
351345

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<PackageVersion Include="System.Composition" Version="10.0.2" />
2222
<PackageVersion Include="System.Composition.AttributedModel" Version="10.0.2" />
2323
<PackageVersion Include="System.Security.Cryptography.ProtectedData" Version="10.0.2" />
24-
<PackageVersion Include="Tmds.DBus.Protocol" Version="0.23.0" />
24+
<PackageVersion Include="Tmds.DBus.Protocol" Version="0.90.0" />
2525
</ItemGroup>
2626
</Project>

0 commit comments

Comments
 (0)