mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 01:08:47 +02:00
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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user