Commit aa96e2d
authored
fix: pending requests not forwarded on worker termination (#316)
When a new config is received that is supposed to terminate some workers, we blindly close connection between these workers and their receivers, which blocks the worker to be terminated forward remaining requests to it's receiver. In order to fix this, code was updated in a way that only the senders of the workers to be terminated will close their connection and the receivers of the workers to be terminated will close the connection when a broken world exception is raised, meaning that the worker is terminated and all requests were forwarded. Also, refactored the code so the cleanup is done in router only.1 parent 2d3426c commit aa96e2d
2 files changed
+10
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | 137 | | |
146 | 138 | | |
147 | 139 | | |
| |||
165 | 157 | | |
166 | 158 | | |
167 | 159 | | |
168 | | - | |
169 | | - | |
170 | 160 | | |
171 | 161 | | |
172 | 162 | | |
| |||
217 | 207 | | |
218 | 208 | | |
219 | 209 | | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
224 | 215 | | |
225 | 216 | | |
226 | 217 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| |||
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
204 | | - | |
| 205 | + | |
205 | 206 | | |
206 | 207 | | |
207 | 208 | | |
| |||
217 | 218 | | |
218 | 219 | | |
219 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
220 | 224 | | |
221 | 225 | | |
222 | 226 | | |
| |||
0 commit comments