Skip to content

Commit

Permalink
✂️ conn: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
database64128 committed Sep 20, 2024
1 parent c2ed835 commit 18f0e1b
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions conn/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 18f0e1b

Please sign in to comment.