mirror of
https://github.com/restic/rest-server.git
synced 2026-10-15 15:10:07 -07:00
avoid potential data race for err variable
This commit is contained in:
@@ -206,6 +206,7 @@ func (app *restServerApp) runRoot(_ *cobra.Command, _ []string) error {
|
||||
|
||||
// run server in background
|
||||
go func() {
|
||||
var err error
|
||||
if !enabledTLS {
|
||||
err = srv.Serve(listener)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user