From 91b469afd0dfa771926872101ca549406418079c Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Fri, 2 Jun 2023 22:58:33 +0800 Subject: [PATCH] chore: Reject packet conn implement wait read --- adapter/outbound/reject.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/adapter/outbound/reject.go b/adapter/outbound/reject.go index a469ed2a..a72dc377 100644 --- a/adapter/outbound/reject.go +++ b/adapter/outbound/reject.go @@ -78,8 +78,11 @@ type nopPacketConn struct{} func (npc nopPacketConn) WriteTo(b []byte, addr net.Addr) (n int, err error) { return len(b), nil } func (npc nopPacketConn) ReadFrom(b []byte) (int, net.Addr, error) { return 0, nil, io.EOF } -func (npc nopPacketConn) Close() error { return nil } -func (npc nopPacketConn) LocalAddr() net.Addr { return udpAddrIPv4Unspecified } -func (npc nopPacketConn) SetDeadline(time.Time) error { return nil } -func (npc nopPacketConn) SetReadDeadline(time.Time) error { return nil } -func (npc nopPacketConn) SetWriteDeadline(time.Time) error { return nil } +func (npc nopPacketConn) WaitReadFrom() ([]byte, func(), net.Addr, error) { + return nil, nil, nil, io.EOF +} +func (npc nopPacketConn) Close() error { return nil } +func (npc nopPacketConn) LocalAddr() net.Addr { return udpAddrIPv4Unspecified } +func (npc nopPacketConn) SetDeadline(time.Time) error { return nil } +func (npc nopPacketConn) SetReadDeadline(time.Time) error { return nil } +func (npc nopPacketConn) SetWriteDeadline(time.Time) error { return nil }