Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ConnOption WithDefaultSendTimeout #380

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

NinniPat
Copy link

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.

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 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.

Change-Id: I49f34caeeace5b2cf29e56ef97f7a4817d15d158
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 unless we have
specified the context.

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.

Change-Id: I49f34caeeace5b2cf29e56ef97f7a4817d15d158
…with-default-timeout

* 'with-default-timeout' of github.com:NinniPat/dbus:
  Add ConnOption WithDefaultSendTimeout

Change-Id: I5266c000d24ff8985f3ea9e04eda51fef64966f7
Instead of using a bool to determine if we have specified the context,
we now assume that context.TODO() is only sent from functions where the
user didn't specify a context. If we have context.TODO() and a default
timeout we will use that to create our context and cancelFunc, otherwise
we will use context.Background() or the provided context.

Change-Id: I043aae124a92ba55beac0f380dc8ad3a44bbf382
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.

1 participant