godbus / dbus

Native Go bindings for D-Bus
BSD 2-Clause "Simplified" License
976 stars 225 forks source link

Add ConnOption WithDefaultSendTimeout #380

Open NinniPat opened 7 months ago

NinniPat commented 7 months ago

Added a default timeout for a connection, as well as a ConnOption to set this value. If a default timeout has been set, all calls from that connection will be aborted if the timeout is exceeded. If the context is specified in the call, we ignore the default timeout.

If we always want to have the same timeout for all calls from a connection, it would be easier if the timeout could be set once to the connection itself rather than always having to use CallWithContext.