small fixes of timeouts and dev sh

pull/559/head
kompotkot 2022-03-18 19:11:18 +00:00
rodzic b6b99e5f7a
commit 0fd2b841d9
3 zmienionych plików z 7 dodań i 2 usunięć

Wyświetl plik

@ -114,6 +114,8 @@ func lbJSONRPCHandler(w http.ResponseWriter, r *http.Request, blockchain string,
}
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)
return
case currentUserAccess.dataSource == "database":

Wyświetl plik

@ -173,8 +173,8 @@ func Server() {
server := http.Server{
Addr: fmt.Sprintf("%s:%s", stateCLI.listeningAddrFlag, stateCLI.listeningPortFlag),
Handler: commonHandler,
ReadTimeout: 10 * time.Second,
WriteTimeout: 10 * time.Second,
ReadTimeout: 40 * time.Second,
WriteTimeout: 40 * time.Second,
}
// Start node health checking and current block fetching

Wyświetl plik

@ -1,5 +1,8 @@
#!/usr/bin/env sh
# Colpile application and run with provided arguments
set -e
PROGRAM_NAME="nodebalancer"
go build -o "$PROGRAM_NAME" .