mirror of
https://github.com/reactos/syzkaller.git
synced 2025-02-07 20:38:52 +00:00
manager: server http over ipv4
ipv4 is still more prevalent. In particular, GCE does not support ipv6.
This commit is contained in:
parent
76be3c5d86
commit
2bdb521fb0
@ -6,6 +6,8 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
"html/template"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
_ "net/http/pprof"
|
||||
"runtime"
|
||||
@ -24,8 +26,16 @@ func (mgr *Manager) initHttp() {
|
||||
http.HandleFunc("/corpus", mgr.httpCorpus)
|
||||
http.HandleFunc("/cover", mgr.httpCover)
|
||||
http.HandleFunc("/prio", mgr.httpPrio)
|
||||
logf(0, "serving http on http://%v", mgr.cfg.Http)
|
||||
go http.ListenAndServe(mgr.cfg.Http, nil)
|
||||
|
||||
ln, err := net.Listen("tcp4", mgr.cfg.Http)
|
||||
if err != nil {
|
||||
fatalf("failed to listen on %v: %v", mgr.cfg.Http, err)
|
||||
}
|
||||
logf(0, "serving http on http://%v", ln.Addr())
|
||||
go func() {
|
||||
err := http.Serve(ln, nil)
|
||||
log.Fatalf("failed to serve http: %v", err)
|
||||
}()
|
||||
}
|
||||
|
||||
func (mgr *Manager) httpInfo(w http.ResponseWriter, r *http.Request) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user