- Notifications
You must be signed in to change notification settings - Fork923
Commit4ceb549
authored
chore: close db properly in early exit paths in ConnectToPostgres (#18448)
There were some code paths where if we exited early from the functionthe postgres connection would never get cleaned up.This is the mechanism that cleans up the db - it requires the errvariable to be not nil:https://github.com/coder/coder/blob/118bf981454188c4989e8b565dec67906616f885/cli/server.go#L2319-L23281 parent32239b2 commit4ceb549
1 file changed
+5
-8
lines changedLines changed: 5 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2312 | 2312 |
| |
2313 | 2313 |
| |
2314 | 2314 |
| |
| 2315 | + | |
2315 | 2316 |
| |
2316 | 2317 |
| |
2317 | 2318 |
| |
2318 | 2319 |
| |
2319 | 2320 |
| |
2320 |
| - | |
| 2321 | + | |
2321 | 2322 |
| |
2322 | 2323 |
| |
2323 | 2324 |
| |
2324 | 2325 |
| |
2325 | 2326 |
| |
| 2327 | + | |
2326 | 2328 |
| |
2327 |
| - | |
2328 | 2329 |
| |
2329 | 2330 |
| |
2330 | 2331 |
| |
| |||
2361 | 2362 |
| |
2362 | 2363 |
| |
2363 | 2364 |
| |
2364 |
| - | |
2365 |
| - | |
2366 |
| - | |
2367 |
| - | |
2368 |
| - | |
2369 |
| - | |
| 2365 | + | |
2370 | 2366 |
| |
2371 | 2367 |
| |
2372 | 2368 |
| |
| |||
2408 | 2404 |
| |
2409 | 2405 |
| |
2410 | 2406 |
| |
| 2407 | + | |
2411 | 2408 |
| |
2412 | 2409 |
| |
2413 | 2410 |
| |
|
0 commit comments
Comments
(0)