fix(agent/stream): handle EOF error in UDP server connection

- Updated error handling in the UDP server to ignore io.EOF errors when reading from client connections.
- Added a check to return early if no bytes are read from the client connection.
- Ensured proper closure of tcpListener in the main.go file during cancellation.
This commit is contained in:
yusing
2026-01-07 21:10:47 +08:00
parent d7361c6f52
commit 5048326c20
2 changed files with 6 additions and 2 deletions

View File

@@ -192,9 +192,9 @@ Tips:
{
subtask := t.Subtask("agent-tls-mux", true)
t.OnCancel("stop_mux", func() {
_ = tcpListener.Close()
_ = httpLn.Close()
_ = streamLn.Close()
_ = tcpListener.Close()
})
go func() {
defer subtask.Finish(subtask.FinishCause())