hotfix: sleep 200ms reconnect

This commit is contained in:
naison
2024-10-10 03:35:13 +00:00
parent 875cb8dc8c
commit 5dae60ffbc

View File

@@ -4,6 +4,7 @@ import (
"context"
"fmt"
"net"
"time"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
@@ -39,6 +40,7 @@ func (h *tunHandler) HandleClient(ctx context.Context, tun net.Conn) {
packetConn, err := getRemotePacketConn(ctx, h.chain)
if err != nil {
log.Debugf("[TUN-CLIENT] Failed to get remote conn from %s -> %s: %s", tun.LocalAddr(), remoteAddr, err)
time.Sleep(time.Millisecond * 200)
continue
}
err = transportTunClient(ctx, tunInbound, tunOutbound, packetConn, remoteAddr)