Skip to content

Commit 1180829

Browse files
authored
Merge pull request #716 from openziti/fix-concurrent-map-modification
Fix panic caused by concurrent map modification. URIs are already sanitized at this point. Fixes #689
2 parents b4e8703 + 8f65cb6 commit 1180829

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

ziti/sdkinfo/build_info.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ziti/ziti.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -1285,9 +1285,7 @@ func (context *ContextImpl) getEdgeRouterConn(session *rest_model.SessionDetail,
12851285
var bestER edge.RouterConn
12861286
var unconnected []*rest_model.SessionEdgeRouter
12871287
for _, edgeRouter := range session.EdgeRouters {
1288-
for proto, addr := range edgeRouter.SupportedProtocols {
1289-
addr = strings.Replace(addr, "://", ":", 1)
1290-
edgeRouter.SupportedProtocols[proto] = addr
1288+
for _, addr := range edgeRouter.SupportedProtocols {
12911289
if er, found := context.routerConnections.Get(addr); found {
12921290
h := context.metrics.Histogram("latency." + addr).(metrics2.Histogram)
12931291
if h.Mean() < float64(bestLatency) {

0 commit comments

Comments
 (0)