fix(tun): udp not work when timeout not specified

This commit is contained in:
Haruue Icymoon
2022-11-23 23:32:47 +08:00
parent 9eb0ea4367
commit 7481a859b6

View File

@@ -73,7 +73,7 @@ func startTUN(config *clientConfig, client *core.Client, errChan chan error) {
}
}
tunServer, err := tun.NewServer(client, time.Duration(config.TUN.Timeout)*time.Second,
tunServer, err := tun.NewServer(client, timeout,
config.TUN.Name, config.TUN.MTU,
int(tcpSendBufferSize), int(tcpReceiveBufferSize), config.TUN.TCPModerateReceiveBuffer)
if err != nil {