Skip to content

Commit

Permalink
Bug/Minor: Remove sockpair from HAPROXY_MASTER_CLI
Browse files Browse the repository at this point in the history
With commit haproxy/haproxy@8a02257
was the `sockpair@` added to the master socket.

fix: haproxytech#329
  • Loading branch information
git001 committed Apr 3, 2024
1 parent 14ab8aa commit 8b5d063
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions configure_data_plane.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ func configureAPI(api *operations.DataPlaneAPI) http.Handler { //nolint:cyclop,m
masterRuntime := os.Getenv("HAPROXY_MASTER_CLI")
if misc.IsUnixSocketAddr(masterRuntime) {
haproxyOptions.MasterRuntime = strings.Replace(masterRuntime, "unix@", "", 1)
if strings.Contains(haproxyOptions.MasterRuntime, "sockpair@") {
semikolon := strings.Index(haproxyOptions.MasterRuntime, ";")
if semikolon != -1 {
haproxyOptions.MasterRuntime = haproxyOptions.MasterRuntime[:semikolon]
}
}
}
}

Expand Down

0 comments on commit 8b5d063

Please sign in to comment.