Skip to content

Commit

Permalink
Move udpnat to new library
Browse files Browse the repository at this point in the history
  • Loading branch information
nekohasekai committed Nov 27, 2024
1 parent c44912a commit e39d1b7
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 1,925 deletions.
2 changes: 1 addition & 1 deletion common/canceler/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type TimerPacketConn struct {
func NewPacketConn(ctx context.Context, conn N.PacketConn, timeout time.Duration) (context.Context, N.PacketConn) {
if timeoutConn, isTimeoutConn := common.Cast[PacketConn](conn); isTimeoutConn {
oldTimeout := timeoutConn.Timeout()
if timeout >= oldTimeout {
if oldTimeout > 0 && timeout >= oldTimeout {
return ctx, conn
}
if timeoutConn.SetTimeout(timeout) {
Expand Down
41 changes: 0 additions & 41 deletions common/udpnat/conn_wait.go

This file was deleted.

218 changes: 0 additions & 218 deletions common/udpnat/service.go

This file was deleted.

Loading

0 comments on commit e39d1b7

Please sign in to comment.