File

teal-src/util/hex.d.tl @ 11665:148075532021

net.server_epoll: Prevent stack overflow of opportunistic writes net.http.files serving a big enough file on a fast enough connection with opportunistic_writes enabled could trigger a stack overflow through repeatedly serving more data that immediately gets sent, draining the buffer and triggering more data to be sent. This also blocked the server on a single task until completion or an error. This change prevents nested opportunistic writes, which should prevent the stack overflow, at the cost of reduced download speed, but this is unlikely to be noticeable outside of Gbit networks. Speed at the cost of blocking other processing is not worth it, especially with the risk of stack overflow.
author Kim Alvefur <zash@zash.se>
date Sun, 11 Jul 2021 09:39:21 +0200
parent 11432:113f3912c7cb
child 12606:6683beb96e01
line wrap: on
line source

local type s2s = function (s : string) : string
local record lib
	to : s2s
	from : s2s
end
return lib