From 18f0e1b17dc38af4bd5b74f733ae3fcb72a2df00 Mon Sep 17 00:00:00 2001 From: database64128 Date: Fri, 20 Sep 2024 19:45:19 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=82=EF=B8=8F=20conn:=20remove=20unused=20?= =?UTF-8?q?code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conn/conn.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/conn/conn.go b/conn/conn.go index 50b9788..5086445 100644 --- a/conn/conn.go +++ b/conn/conn.go @@ -10,24 +10,6 @@ type setFunc = func(fd int, network string) error type setFuncSlice []setFunc -func (fns setFuncSlice) controlContextFunc() func(ctx context.Context, network, address string, c syscall.RawConn) error { - if len(fns) == 0 { - return nil - } - return func(ctx context.Context, network, address string, c syscall.RawConn) (err error) { - if cerr := c.Control(func(fd uintptr) { - for _, fn := range fns { - if err = fn(int(fd), network); err != nil { - return - } - } - }); cerr != nil { - return cerr - } - return - } -} - func (fns setFuncSlice) controlFunc() func(network, address string, c syscall.RawConn) error { if len(fns) == 0 { return nil