Move connection closure outside of library to the client code in case of UDP Associate
This commit is contained in:
parent
66fc78695a
commit
0c17babaf9
@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"time"
|
||||
)
|
||||
@ -163,12 +162,6 @@ func (s *Dialer) handleUDP(conn net.Conn, addr *Addr) (*UDPConn, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
go func() {
|
||||
io.Copy(io.Discard, conn)
|
||||
conn.Close()
|
||||
packetConn.Close()
|
||||
}()
|
||||
|
||||
remoteAddr, err := AddrFromSocks(rep.ATYP, rep.BindAddr, rep.BindPort).UDP()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user