You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.9 KiB

  1. commit 7343c710152c586a232a194ef37a56af636d6a56
  2. Author: Willy Tarreau <w@1wt.eu>
  3. Date: Thu Aug 1 18:51:38 2019 +0200
  4. BUG/MINOR: stream-int: also update analysers timeouts on activity
  5. Between 1.6 and 1.7, some parts of the stream forwarding process were
  6. moved into lower layers and the stream-interface had to keep the
  7. stream's task up to date regarding the timeouts. The analyser timeouts
  8. were not updated there as it was believed this was not needed during
  9. forwarding, but actually there is a case for this which is "option
  10. contstats" which periodically triggers the analyser timeout, and this
  11. change broke the option in case of sustained traffic (if there is some
  12. I/O activity during the same millisecond as the timeout expires, then
  13. the update will be missed).
  14. This patch simply brings back the analyser expiration updates from
  15. process_stream() to stream_int_notify().
  16. It may be backported as far as 1.7, taking care to adjust the fields
  17. names if needed.
  18. (cherry picked from commit 45bcb37f0f8fa1e16dd9358a59dc280a38834dcd)
  19. Signed-off-by: Willy Tarreau <w@1wt.eu>
  20. diff --git a/src/stream_interface.c b/src/stream_interface.c
  21. index 9b9a8e9f..7d89cc90 100644
  22. --- a/src/stream_interface.c
  23. +++ b/src/stream_interface.c
  24. @@ -558,6 +558,16 @@ static void stream_int_notify(struct stream_interface *si)
  25. task->expire = tick_first((tick_is_expired(task->expire, now_ms) ? 0 : task->expire),
  26. tick_first(tick_first(ic->rex, ic->wex),
  27. tick_first(oc->rex, oc->wex)));
  28. +
  29. + task->expire = tick_first(task->expire, ic->analyse_exp);
  30. + task->expire = tick_first(task->expire, oc->analyse_exp);
  31. +
  32. + if (si->exp)
  33. + task->expire = tick_first(task->expire, si->exp);
  34. +
  35. + if (sio->exp)
  36. + task->expire = tick_first(task->expire, sio->exp);
  37. +
  38. task_queue(task);
  39. }
  40. if (ic->flags & CF_READ_ACTIVITY)