fix: Deadline not apply on EnhancePacketConn

This commit is contained in:
wwqgtxx
2023-05-11 19:58:50 +08:00
parent 234f7dbd3b
commit 76caab19bf
3 changed files with 8 additions and 2 deletions

View File

@ -128,6 +128,10 @@ type EnhancePacketConn struct {
enhancePacketConn packet.EnhancePacketConn
}
func NewEnhancePacketConn(pc packet.EnhancePacketConn) packet.EnhancePacketConn {
return NewPacketConn(pc).(packet.EnhancePacketConn)
}
func (c *EnhancePacketConn) WaitReadFrom() (data []byte, put func(), addr net.Addr, err error) {
select {
case result := <-c.resultCh: