Fix integration test.

This commit is contained in:
notsure2 2023-05-29 19:32:15 +03:00
parent 9045141035
commit 55c06a0a58
2 changed files with 26 additions and 23 deletions

View File

@ -105,7 +105,9 @@ func RouteTCP(listener net.Listener, streamTimeout time.Duration, singleplex boo
continue
}
syscallConn, err := localConn.(*net.TCPConn).SyscallConn()
conn, ok := localConn.(*net.TCPConn)
if ok {
syscallConn, err := conn.SyscallConn()
if err != nil {
log.Fatal(err)
continue
@ -132,6 +134,7 @@ func RouteTCP(listener net.Listener, streamTimeout time.Duration, singleplex boo
log.Fatal(err)
continue
}
}
if !singleplex && (sesh == nil || sesh.IsClosed()) {
sesh = newSeshFunc()

View File

@ -207,7 +207,7 @@ func establishSession(lcc client.LocalConnConfig, rcc client.RemoteConnConfig, a
} else {
var proxyToCkClientL *connutil.PipeListener
proxyToCkClientD, proxyToCkClientL = connutil.DialerListener(10 * 1024)
go client.RouteTCP(proxyToCkClientL, lcc.Timeout, rcc.Singleplex, clientSeshMaker)
go client.RouteTCP(proxyToCkClientL, lcc.Timeout, rcc.Singleplex, 0, 0, clientSeshMaker)
}
// set up server