Skip to content

Commit a015caa

Browse files
authored
Merge pull request #99 from fastly/joeshaw/dont-defer-rw-close
2 parents a8ec914 + f2a9a7b commit a015caa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fsthttp/handle.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ func Serve(h Handler) {
3535
}
3636
})
3737

38-
defer clientResponseWriter.Close()
3938
h.ServeHTTP(ctx, clientResponseWriter, clientRequest)
39+
clientResponseWriter.Close()
4040
}
4141

4242
// ServeFunc is sugar for Serve(HandlerFunc(f)).

0 commit comments

Comments
 (0)