Merge pull request #5674 from torkelrogstad/2021-08-26-http-mux
lntest: avoid global ServeMux
This commit is contained in:
2 files changed
+10
-4
No files matched your search
@@ -46,11 +46,13 @@ func startFeeService() *feeService {
|
||||
f.Fees = map[uint32]uint32{feeServiceTarget: 50000}
|
||||
|
||||
listenAddr := fmt.Sprintf(":%v", port)
|
||||
f.srv = &http.Server{
|
||||
Addr: listenAddr,
|
||||
}
|
||||
mux := http.NewServeMux()
|
||||
mux.HandleFunc("/fee-estimates.json", f.handleRequest)
|
||||
|
||||
http.HandleFunc("/fee-estimates.json", f.handleRequest)
|
||||
f.srv = &http.Server{
|
||||
Addr: listenAddr,
|
||||
Handler: mux,
|
||||
}
|
||||
|
||||
f.wg.Add(1)
|
||||
go func() {
|
||||
|
||||
Reference in new issue
Block a user