mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-31 14:13:09 +02:00
feat: enhance idlewaker loading page design and add favicon handling in waker_http, removed unnecessary checkings
This commit is contained in:
@@ -37,12 +37,14 @@ var (
|
||||
clientMapMu sync.RWMutex
|
||||
)
|
||||
|
||||
var initClientCleanerOnce sync.Once
|
||||
|
||||
const (
|
||||
cleanInterval = 10 * time.Second
|
||||
clientTTLSecs = int64(10)
|
||||
)
|
||||
|
||||
func init() {
|
||||
func initClientCleaner() {
|
||||
cleaner := task.RootTask("docker_clients_cleaner")
|
||||
go func() {
|
||||
ticker := time.NewTicker(cleanInterval)
|
||||
@@ -115,6 +117,8 @@ func (c *SharedClient) Close() {
|
||||
// - Client: the Docker client connection.
|
||||
// - error: an error if the connection failed.
|
||||
func NewClient(host string) (*SharedClient, error) {
|
||||
initClientCleanerOnce.Do(initClientCleaner)
|
||||
|
||||
clientMapMu.Lock()
|
||||
defer clientMapMu.Unlock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user