小优化
This commit is contained in:
parent
eb973a1942
commit
e876fd0823
3
main.go
3
main.go
@ -168,6 +168,7 @@ func (f *fetchHandler) handle(conn string) {
|
|||||||
}
|
}
|
||||||
for _, sourceName := range (*f.searchSource.mapX)[conn] {
|
for _, sourceName := range (*f.searchSource.mapX)[conn] {
|
||||||
source := f.sourceMap[sourceName]
|
source := f.sourceMap[sourceName]
|
||||||
|
go func() {
|
||||||
r := f.fetch2(source, key)
|
r := f.fetch2(source, key)
|
||||||
if r != nil && r.StatusCode == 200 {
|
if r != nil && r.StatusCode == 200 {
|
||||||
if strings.ToUpper(source.Type) == "HTML" {
|
if strings.ToUpper(source.Type) == "HTML" {
|
||||||
@ -176,6 +177,8 @@ func (f *fetchHandler) handle(conn string) {
|
|||||||
f.parseAjax(r, source, conn)
|
f.parseAjax(r, source, conn)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user