canonical / go-dqlite

Go bindings for libdqlite
https://dqlite.io
Apache License 2.0
432 stars 69 forks source link

internal/protocol: Default timeout for Call #274

Closed cole-miller closed 4 months ago

cole-miller commented 1 year ago

This implements the suggestion to have a default or "fallback" timeout for calls to protocol.Connector.Connect() in #235. The fallback timeout of 30 seconds is used only if the passed context does not already have a deadline configured.

Closes #235

Signed-off-by: Cole Miller cole.miller@canonical.com

cole-miller commented 1 year ago

@manadart Thanks, I guess I got my wires crossed interpreting that issue thread. Let me confirm that updating the Call logic makes sense and I'll push v2.

cole-miller commented 1 year ago

Okay, the latest commit sets a default deadline for Call instead of for Connect.