@@ -55,7 +55,7 @@ func (transport *Transport) HandleClient(config tcp.ClientConfig, remote string)
5555 client := tcp .NewClient (remote , config , transport .logger )
5656 clientLogger := transport .logger .With ().Str ("remoteAddress" , remote ).Logger ()
5757 defer clientLogger .Warn ().Msg ("abort connection" )
58- var hasConnected = false
58+ hasConnected : = false
5959
6060 for {
6161 conn , err := client .Dial ()
@@ -126,7 +126,8 @@ func (transport *Transport) handleTCPConn(conn net.Conn) error {
126126 return err
127127 }
128128
129- connectionLogger := transport .logger .With ().Str ("remoteAddress" , conn .RemoteAddr ().String ()).Str ("target" , string (target )).Logger ()
129+ connectionLogger := transport .logger .With ().
130+ Str ("remoteAddress" , conn .RemoteAddr ().String ()).Str ("target" , string (target )).Logger ()
130131 connectionLogger .Info ().Msg ("new connection" )
131132
132133 if err := transport .rejectIfConnectedTCPConn (target , conn , connectionLogger ); err != nil {
@@ -143,6 +144,7 @@ func (transport *Transport) handleTCPConn(conn net.Conn) error {
143144 cleanupConn := transport .registerTCPConn (target , conn , connectionLogger )
144145 defer cleanupConn ()
145146
147+ // Notify vehicle of connection status.
146148 transport .api .ConnectionUpdate (target , true )
147149 defer transport .api .ConnectionUpdate (target , false )
148150
0 commit comments