mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-29 12:42:46 +00:00
Squashed commit of the following:
commit b4cb47aa1329d2ada10ae6426fd9d2a69f47536a Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Wed Jul 8 14:13:27 2020 +0100 Restrict transaction send context time commit 7c28205cdb5d842071d46b1ec599d09cca708e57 Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Wed Jul 8 14:00:06 2020 +0100 Add to gobind build commit d9e2c72e0576a2eb0ce6ac48eed6cc9d4761a0ea Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Wed Jul 8 13:43:21 2020 +0100 Wake up destination queues for new sessions/links commit 21766c6c52bd00511d28981457e9034358c32a8d Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Wed Jul 8 13:17:18 2020 +0100 Tweak QUIC parameters
This commit is contained in:
parent
de0f427ddc
commit
af6bc47f16
6 changed files with 100 additions and 5 deletions
|
@ -381,7 +381,9 @@ func (oq *destinationQueue) nextTransaction(
|
|||
// TODO: we should check for 500-ish fails vs 400-ish here,
|
||||
// since we shouldn't queue things indefinitely in response
|
||||
// to a 400-ish error
|
||||
_, err = oq.client.SendTransaction(context.TODO(), t)
|
||||
ctx, cancel = context.WithTimeout(context.Background(), time.Second*15)
|
||||
defer cancel()
|
||||
_, err = oq.client.SendTransaction(ctx, t)
|
||||
switch err.(type) {
|
||||
case nil:
|
||||
// No error was returned so the transaction looks to have
|
||||
|
@ -389,7 +391,7 @@ func (oq *destinationQueue) nextTransaction(
|
|||
oq.pendingPDUs.Sub(int64(len(t.PDUs)))
|
||||
// Clean up the transaction in the database.
|
||||
if err = oq.db.CleanTransactionPDUs(
|
||||
context.TODO(),
|
||||
context.Background(),
|
||||
t.Destination,
|
||||
t.TransactionID,
|
||||
); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue