mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Optimize for-loop iteration: exit early when httpOnly is true
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 <haohtml@gmail.com>
This commit is contained in:
parent
4a11ca6c89
commit
3f082f5a68
@ -767,6 +767,7 @@ func (e *Etcd) serveClients() {
|
||||
for _, sctx := range e.sctxs {
|
||||
if sctx.httpOnly {
|
||||
splitHTTP = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user