moonbridge
changeset 51:2be59069a184
Send TCP RST in case of input error when output has already been (partially) written
author | jbe |
---|---|
date | Fri Mar 20 15:38:54 2015 +0100 (2015-03-20) |
parents | 0dd15d642124 |
children | 042bb4854aa6 |
files | moonbridge_http.lua |
line diff
1.1 --- a/moonbridge_http.lua Fri Mar 20 02:27:28 2015 +0100 1.2 +++ b/moonbridge_http.lua Fri Mar 20 15:38:54 2015 +0100 1.3 @@ -253,6 +253,11 @@ 1.4 request.faulty = true 1.5 error("Unexpected error while sending error response: " .. errmsg2) 1.6 end 1.7 + else 1.8 + if not socket_closed then 1.9 + socket_closed = true 1.10 + socket:cancel() 1.11 + end 1.12 end 1.13 if throw_error then 1.14 request.faulty = true