Skip to content

Commit

Permalink
Optimize for-loop iteration: exit early when httpOnly is true
Browse files Browse the repository at this point in the history
Optimize for-loop iteration: exit early when httpOnly is true

```
	for _, sctx := range e.sctxs {
		if sctx.httpOnly {
			splitHTTP = true
			break
		}
	}
```

Signed-off-by: cfanbo <[email protected]>
  • Loading branch information
cfanbo committed Sep 5, 2024
1 parent 4a11ca6 commit 3f082f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/embed/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,7 @@ func (e *Etcd) serveClients() {
for _, sctx := range e.sctxs {
if sctx.httpOnly {
splitHTTP = true
break
}
}

Expand Down

0 comments on commit 3f082f5

Please sign in to comment.