Commit eb47eb8
committed
Respoect max_inlight message count in reconnect
Previously if the message queue filled up for some reason like bad
connection and the client disconnected (due to e.g. bad connection),
it would send all of it's messages in _out_messages-queue and not
respect _max_inflight_messages parameter. With some brokers and
when we had 1000s of messages in queue and all being sent with
qos 1 without any regard to the _max_inflight_messages, the broker
would disconnect us or the connection would again break down.
This patch makes sure _max_inflight_messages is respected when
reconnect happens for any reason.
I believe this also fixes #492
Signed-off-by: Juha Ylikoski <juha.ylikoski@treon.fi>1 parent 9782ab8 commit eb47eb8
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2945 | 2945 | | |
2946 | 2946 | | |
2947 | 2947 | | |
| 2948 | + | |
2948 | 2949 | | |
2949 | 2950 | | |
2950 | | - | |
| 2951 | + | |
2951 | 2952 | | |
2952 | 2953 | | |
2953 | 2954 | | |
2954 | 2955 | | |
2955 | 2956 | | |
2956 | 2957 | | |
2957 | 2958 | | |
| 2959 | + | |
2958 | 2960 | | |
2959 | 2961 | | |
2960 | 2962 | | |
| |||
2968 | 2970 | | |
2969 | 2971 | | |
2970 | 2972 | | |
| 2973 | + | |
2971 | 2974 | | |
2972 | 2975 | | |
2973 | 2976 | | |
| |||
0 commit comments