Repository navigation
Commit 9129ebb
committed
db: roll back the request transaction on handler panic
The middleware only committed or rolled back after the handler returned.
If the handler panicked, control jumped to the recoverer and the open
transaction was leaked. Add a deferred rollback that runs unless one of
the normal commit/rollback paths already handled it.
Signed-off-by: Robin Jarry <robin@jarry.cc>1 parent b452b8b commit 9129ebb
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
55 | 66 | | |
| 67 | + | |
56 | 68 | | |
57 | 69 | | |
58 | 70 | | |
| |||
0 commit comments