@@ -709,13 +709,10 @@ func (c *Common) commonTCPLoop() {
709709 }
710710
711711 c .logger .Debug ("TCP launch signal: cid %v -> %v" , id , c .tunnelTCPConn .RemoteAddr ())
712- c .logger .Debug ("Starting exchange: %v <-> %v" , remoteConn .LocalAddr (), targetConn .LocalAddr ())
713712
714713 // 交换数据
715- _ , _ , err := conn .DataExchange (remoteConn , targetConn , c .readTimeout )
716-
717- // 交换完成
718- c .logger .Debug ("Exchange complete: %v" , err )
714+ c .logger .Debug ("Starting exchange: %v <-> %v" , remoteConn .LocalAddr (), targetConn .LocalAddr ())
715+ c .logger .Debug ("Exchange complete: %v" , conn .DataExchange (remoteConn , targetConn , c .readTimeout ))
719716 }(targetConn )
720717 }
721718}
@@ -981,10 +978,7 @@ func (c *Common) commonTCPOnce(signalURL *url.URL) {
981978
982979 // 交换数据
983980 c .logger .Debug ("Starting exchange: %v <-> %v" , remoteConn .LocalAddr (), targetConn .LocalAddr ())
984- _ , _ , err = conn .DataExchange (remoteConn , targetConn , c .readTimeout )
985-
986- // 交换完成
987- c .logger .Debug ("Exchange complete: %v" , err )
981+ c .logger .Debug ("Exchange complete: %v" , conn .DataExchange (remoteConn , targetConn , c .readTimeout ))
988982}
989983
990984// commonUDPOnce 共用处理单个UDP请求
@@ -1257,10 +1251,7 @@ func (c *Common) singleTCPLoop() error {
12571251
12581252 // 交换数据
12591253 c .logger .Debug ("Starting exchange: %v <-> %v" , tunnelConn .LocalAddr (), targetConn .LocalAddr ())
1260- _ , _ , err = conn .DataExchange (tunnelConn , targetConn , c .readTimeout )
1261-
1262- // 交换完成
1263- c .logger .Debug ("Exchange complete: %v" , err )
1254+ c .logger .Debug ("Exchange complete: %v" , conn .DataExchange (tunnelConn , targetConn , c .readTimeout ))
12641255 }(tunnelConn )
12651256 }
12661257}
0 commit comments