Skip to content

Commit

Permalink
Merge pull request #175 from orozery/nit
Browse files Browse the repository at this point in the history
dataplane/server/listener: Close socket on error
  • Loading branch information
orozery authored Nov 13, 2023
2 parents 4776b0f + 2655678 commit 2f5dd2f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/dataplane/server/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ func (d *Dataplane) serveEgressConnections(name string, listener net.Listener) e
go func() {
err := d.initiateEgressConnection(targetPeer, accessToken, conn, tlsConfig)
if err != nil {
d.logger.Errorf("Failed to initiate egress connection: %v.", err)
d.logger.Errorf("Failed to initiate egress connection: %v.", err)
conn.Close()
}
}()
}
Expand Down

0 comments on commit 2f5dd2f

Please sign in to comment.