v1.5.1 增强程序稳定性

This commit is contained in:
robin
2026-03-22 17:37:40 +08:00
parent afbaaa869c
commit 17e182b413
652 changed files with 22949 additions and 34397 deletions

View File

@@ -6,8 +6,10 @@ package http3
import (
"context"
"errors"
"fmt"
"github.com/quic-go/quic-go"
http3quic "github.com/quic-go/quic-go/http3"
"log"
"net"
"net/http"
)
@@ -45,6 +47,12 @@ func (this *Server) Serve(listener Listener) error {
continue
}
go func() {
defer func() {
if r := recover(); r != nil {
log.Println(fmt.Sprintf("[HTTP3]goroutine panic: %v", r))
}
}()
// 通知ConnState
if this.ConnState != nil {
netConn, isNetConn := conn.(net.Conn)