Skip to content

Commit 19840db

Browse files
aojeaaboch
authored andcommitted
Remove netlink subscription in socket_linux.go
Removed netlink subscription that seems was a left over from the cleanup in a57a7bd
1 parent cd3cb2e commit 19840db

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

socket_linux.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,6 @@ func (h *Handle) SocketDestroy(local, remote net.Addr) error {
261261
return ErrNotImplemented
262262
}
263263

264-
s, err := nl.Subscribe(unix.NETLINK_INET_DIAG)
265-
if err != nil {
266-
return err
267-
}
268-
defer s.Close()
269264
req := h.newNetlinkRequest(nl.SOCK_DESTROY, unix.NLM_F_ACK)
270265
req.AddData(&socketRequest{
271266
Family: unix.AF_INET,
@@ -279,7 +274,7 @@ func (h *Handle) SocketDestroy(local, remote net.Addr) error {
279274
},
280275
})
281276

282-
_, err = req.Execute(unix.NETLINK_INET_DIAG, 0)
277+
_, err := req.Execute(unix.NETLINK_INET_DIAG, 0)
283278
return err
284279
}
285280

0 commit comments

Comments
 (0)