Commit f2a9a7b
committed
don't defer closing the response writer
Closing the response writer signifies to the Compute runtime that the
response has been successfully completed, so we shouldn't defer it in
case the handler panics.
In TinyGo, defers aren't run after panic so this wasn't executed. In
Go, defers are run. The result of this was that if a handler panicked
before sending a response, it would send an empty 200 OK response in Go
but a 500 Internal Server Error in TinyGo.
Fixes #98.1 parent a330904 commit f2a9a7b
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments