Commit 3375f58
authored
[FIXED] Gateway RS+/- blocks on account fetch (#7449)
The methods `processGatewayRSub` and `processGatewayRUnsub` can call
into `updateInterestForAccountOnGateway`, which in turn calls
`s.LookupAccount`. If the account is not known it will be fetched if
there's an account resolver. But, since this is done while in the read
loop of the gateway, this blocks not only receiving the response for the
account fetch (when using a NATS resolver) but also any other operation
like PING/PONG, which then could lead to a stale connection.
The fix proposed by this PR is to not allow fetching the account inline
of the gateway read loop.
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>File tree
4 files changed
+69
-4
lines changed- server
4 files changed
+69
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
7557 | 7558 | | |
7558 | 7559 | | |
7559 | 7560 | | |
| 7561 | + | |
| 7562 | + | |
| 7563 | + | |
| 7564 | + | |
| 7565 | + | |
| 7566 | + | |
| 7567 | + | |
| 7568 | + | |
| 7569 | + | |
| 7570 | + | |
| 7571 | + | |
| 7572 | + | |
| 7573 | + | |
| 7574 | + | |
| 7575 | + | |
| 7576 | + | |
| 7577 | + | |
| 7578 | + | |
| 7579 | + | |
| 7580 | + | |
| 7581 | + | |
| 7582 | + | |
| 7583 | + | |
| 7584 | + | |
| 7585 | + | |
| 7586 | + | |
| 7587 | + | |
| 7588 | + | |
| 7589 | + | |
| 7590 | + | |
| 7591 | + | |
| 7592 | + | |
| 7593 | + | |
| 7594 | + | |
| 7595 | + | |
| 7596 | + | |
| 7597 | + | |
| 7598 | + | |
| 7599 | + | |
| 7600 | + | |
| 7601 | + | |
| 7602 | + | |
| 7603 | + | |
| 7604 | + | |
| 7605 | + | |
| 7606 | + | |
| 7607 | + | |
| 7608 | + | |
| 7609 | + | |
| 7610 | + | |
| 7611 | + | |
| 7612 | + | |
| 7613 | + | |
| 7614 | + | |
| 7615 | + | |
| 7616 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4411 | 4411 | | |
4412 | 4412 | | |
4413 | 4413 | | |
4414 | | - | |
| 4414 | + | |
4415 | 4415 | | |
4416 | 4416 | | |
4417 | 4417 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2426 | 2426 | | |
2427 | 2427 | | |
2428 | 2428 | | |
2429 | | - | |
| 2429 | + | |
| 2430 | + | |
2430 | 2431 | | |
2431 | 2432 | | |
2432 | 2433 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2051 | 2051 | | |
2052 | 2052 | | |
2053 | 2053 | | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
2054 | 2061 | | |
2055 | 2062 | | |
2056 | 2063 | | |
| |||
2060 | 2067 | | |
2061 | 2068 | | |
2062 | 2069 | | |
2063 | | - | |
| 2070 | + | |
2064 | 2071 | | |
2065 | 2072 | | |
2066 | 2073 | | |
| |||
2072 | 2079 | | |
2073 | 2080 | | |
2074 | 2081 | | |
2075 | | - | |
| 2082 | + | |
2076 | 2083 | | |
2077 | 2084 | | |
2078 | 2085 | | |
| |||
0 commit comments