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
		}
	}
```
  • Loading branch information
cfanbo authored Sep 5, 2024
1 parent 4a11ca6 commit 652031e
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 652031e

Please sign in to comment.