Skip to content

Commit

Permalink
move time.sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
cj123 committed Apr 2, 2019
1 parent 7499283 commit b5b550d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions server_process.go
Expand Up @@ -3,6 +3,8 @@ package servermanager
import (
"bytes"
"errors"
"github.com/go-chi/chi"
"github.com/sirupsen/logrus"
"net"
"net/http"
"os"
Expand All @@ -11,9 +13,6 @@ import (
"strings"
"sync"
"time"

"github.com/go-chi/chi"
"github.com/sirupsen/logrus"
)

const MaxLogSizeBytes = 1e6
Expand Down Expand Up @@ -207,8 +206,6 @@ func (as *AssettoServerProcess) Restart() error {
}
}

time.Sleep(time.Millisecond * 500)

return as.Start()
}

Expand Down Expand Up @@ -247,6 +244,8 @@ func (as *AssettoServerProcess) Stop() error {

as.stopChildProcesses()

time.Sleep(time.Millisecond * 500)

return nil
}

Expand Down

0 comments on commit b5b550d

Please sign in to comment.