Bug fixes, cleanup
This commit is contained in:
@@ -31,7 +31,7 @@ type App struct {
|
|||||||
insecure bool
|
insecure bool
|
||||||
|
|
||||||
// Per-remote address sign-in serialization lock.
|
// Per-remote address sign-in serialization lock.
|
||||||
signInLock keyedmutex.KeyedMutex[string]
|
signInLock *keyedmutex.KeyedMutex[string]
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewApp(conf Config) (*App, error) {
|
func NewApp(conf Config) (*App, error) {
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"vppn/hub/api"
|
"vppn/hub/api"
|
||||||
"vppn/hub/errs"
|
"vppn/hub/errs"
|
||||||
|
|
||||||
"git.crumpington.com/lib/webutil"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type handlerFunc func(s *api.Session, w http.ResponseWriter, r *http.Request) error
|
type handlerFunc func(s *api.Session, w http.ResponseWriter, r *http.Request) error
|
||||||
@@ -75,9 +73,7 @@ func (app *App) handlePeer(pattern string, fn peerHandlerFunc) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
app.mux.HandleFunc(pattern,
|
app.mux.HandleFunc(pattern, withLogging(wrapped))
|
||||||
webutil.WithLogging(
|
|
||||||
wrapped))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleError(w http.ResponseWriter, err error) {
|
func handleError(w http.ResponseWriter, err error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user