Commit ce9e7ad
authored
fix(agent): ignore EOF errors during shutdown (#21187)
fixes: coder/internal#1179
The problem in that flake is that dRPC doensn't consistently return
`context.Canceled` if you make an RPC call and then cancel it: sometimes
it returns EOF.
Without this PR, if we get an EOF on one of the routines that uses the
agentapi connection, we tear down the whole connection and reconnect to
coderd --- even if we are in the middle of a graceful shutdown.
What happened in the linked flake is that writing stats failed with EOF,
which then caused us to reconnect and write the lifecycle "SHUTTING
DOWN" twice.1 parent b199eb1 commit ce9e7ad
1 file changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2189 | 2189 | | |
2190 | 2190 | | |
2191 | 2191 | | |
2192 | | - | |
2193 | | - | |
| 2192 | + | |
| 2193 | + | |
| 2194 | + | |
| 2195 | + | |
2194 | 2196 | | |
2195 | 2197 | | |
2196 | | - | |
2197 | | - | |
2198 | | - | |
2199 | | - | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
2200 | 2205 | | |
2201 | 2206 | | |
2202 | 2207 | | |
| |||
0 commit comments