From 143f134d7ee86c95717df94e96d6f518c39b6e53 Mon Sep 17 00:00:00 2001 From: ignoramous Date: Fri, 1 Jul 2022 01:56:38 +0530 Subject: [PATCH] fdbased: error is specifically tcpip.Error --- pkg/tcpip/link/fdbased/endpoint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/tcpip/link/fdbased/endpoint.go b/pkg/tcpip/link/fdbased/endpoint.go index e0d58b355..ac7835146 100644 --- a/pkg/tcpip/link/fdbased/endpoint.go +++ b/pkg/tcpip/link/fdbased/endpoint.go @@ -556,7 +556,7 @@ func (e *endpoint) sendBatch(batchFDInfo fdInfo, pkts []*stack.PacketBuffer) (in // Degrade to writePacket if underlying fd is not a socket. if !batchFDInfo.isSocket { var written int - var err error + var err tcpip.Error for written < len(pkts) { if err = e.writePacket(pkts[written]); err != nil { break