Improve reconnection policy and context handling in Queryx
This commit is contained in:
committed by
Sylwia Szunejko
parent
2f79f86b7c
commit
fd84cf32de
@@ -86,6 +86,9 @@ func (q *Queryx) RoutingKey(routingKey []byte) *Queryx {
|
||||
// query, queries will be canceled and return once the context is
|
||||
// canceled.
|
||||
func (q *Queryx) WithContext(ctx context.Context) *Queryx {
|
||||
if ctx == nil {
|
||||
ctx = context.Background()
|
||||
}
|
||||
q.Query = q.Query.WithContext(ctx)
|
||||
return q
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user