kopia lustrzana https://github.com/bugout-dev/moonstream
small fixes of timeouts and dev sh
rodzic
b6b99e5f7a
commit
0fd2b841d9
|
@ -114,6 +114,8 @@ func lbJSONRPCHandler(w http.ResponseWriter, r *http.Request, blockchain string,
|
||||||
}
|
}
|
||||||
|
|
||||||
r.URL.Path = "/"
|
r.URL.Path = "/"
|
||||||
|
// If required detailed timeout configuration, define node.GethReverseProxy.Transport = &http.Transport{}
|
||||||
|
// as modified structure of DefaultTransport net/http/transport/DefaultTransport
|
||||||
node.GethReverseProxy.ServeHTTP(w, r)
|
node.GethReverseProxy.ServeHTTP(w, r)
|
||||||
return
|
return
|
||||||
case currentUserAccess.dataSource == "database":
|
case currentUserAccess.dataSource == "database":
|
||||||
|
|
|
@ -173,8 +173,8 @@ func Server() {
|
||||||
server := http.Server{
|
server := http.Server{
|
||||||
Addr: fmt.Sprintf("%s:%s", stateCLI.listeningAddrFlag, stateCLI.listeningPortFlag),
|
Addr: fmt.Sprintf("%s:%s", stateCLI.listeningAddrFlag, stateCLI.listeningPortFlag),
|
||||||
Handler: commonHandler,
|
Handler: commonHandler,
|
||||||
ReadTimeout: 10 * time.Second,
|
ReadTimeout: 40 * time.Second,
|
||||||
WriteTimeout: 10 * time.Second,
|
WriteTimeout: 40 * time.Second,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start node health checking and current block fetching
|
// Start node health checking and current block fetching
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
# Colpile application and run with provided arguments
|
||||||
|
set -e
|
||||||
|
|
||||||
PROGRAM_NAME="nodebalancer"
|
PROGRAM_NAME="nodebalancer"
|
||||||
|
|
||||||
go build -o "$PROGRAM_NAME" .
|
go build -o "$PROGRAM_NAME" .
|
||||||
|
|
Ładowanie…
Reference in New Issue