Skip to content

Add ConnectUnixAsync to DBusTransport#11

Merged
jmacato merged 1 commit into
mainfrom
features/connect-unix-async
Apr 4, 2026
Merged

Add ConnectUnixAsync to DBusTransport#11
jmacato merged 1 commit into
mainfrom
features/connect-unix-async

Conversation

@jmacato
Copy link
Copy Markdown
Member

@jmacato jmacato commented Apr 3, 2026

Summary

  • Adds async overloads of ConnectUnix to DBusTransport that use socket.ConnectAsync() with CancellationToken support
  • Enables non-blocking Unix domain socket connects for peer-to-peer D-Bus connections
  • Used by Babylon's DBusAutomation client to allow proper cancellation and retry on connection refused

Test plan

  • Verify existing ConnectUnix (sync) tests still pass
  • Verify ConnectUnixAsync connects to a listening Unix socket
  • Verify cancellation token aborts the connect and disposes the socket

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds async overloads of ConnectUnix to the DBusTransport class to enable non-blocking Unix domain socket connections for peer-to-peer D-Bus communication with proper cancellation token support.

Changes:

  • Adds ConnectUnixAsync(string socketPath, CancellationToken) overload for basic async connection
  • Adds ConnectUnixAsync(string socketPath, IDBusDiagnostics?, CancellationToken) overload with diagnostics support
  • Implements proper exception handling with socket disposal on connection failure
  • Follows the same pattern as the existing synchronous ConnectUnix methods

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jmacato jmacato merged commit d2fc810 into main Apr 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants