debian-forge-composer/internal/kojiapi
Ondřej Budai 03768e5f18 api/worker, koji: fix race condition when using multiple listeners
When remote worker socket was enabled, this was happening:

e := echo.New()

go func() {
    e.Listener = listener1
    e.Start("")
}()

e.Listener = listener2
e.Start("")

Yeah, this is a race condition. None of the echo's Start methods cannot safely
handle multiple listeners.

This commit fixes this issue by using Echo only as a router for standard
http.Server which handles multiple listeners in a non-racy way.
2020-09-23 09:38:29 +02:00
..
api kojiapi: move from chi to echo 2020-09-21 11:18:45 +01:00
server.go api/worker, koji: fix race condition when using multiple listeners 2020-09-23 09:38:29 +02:00