fix: In high concurrency (200+), V-Hono experiences an error where the connection is reset problem

This commit is contained in:
meiseayoung
2025-12-30 19:23:09 +08:00
parent 8e1007a1b4
commit d0298ea577
4 changed files with 103 additions and 5 deletions
+24
View File
@@ -0,0 +1,24 @@
// 测试服务器 - 用于高并发测试
module main
import hono
import net.http
fn main() {
mut app := hono.Hono.new()
// 简单的测试路由
app.get('/', fn (mut c hono.Context) http.Response {
return c.text('OK')
})
app.get('/delay', fn (mut c hono.Context) http.Response {
// 模拟一些处理延迟
return c.text('OK with delay')
})
println('测试服务器启动中...')
println('配置: timeout_secs=120, keepalive_timeout=30, max_keepalive_req=10000')
app.listen(':8888')
}