fixed waitgroup
This commit is contained in:
parent
3fc77c5b73
commit
e8edfdaf83
2 changed files with 3 additions and 3 deletions
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
|
@ -9,9 +9,9 @@
|
||||||
"program": "${workspaceFolder}/main.go",
|
"program": "${workspaceFolder}/main.go",
|
||||||
"env":{
|
"env":{
|
||||||
"SLIDESHOW_API": "localhost:3000",
|
"SLIDESHOW_API": "localhost:3000",
|
||||||
"SLIDESHOW_INTERVAL": "60",
|
"SLIDESHOW_INTERVAL": "3",
|
||||||
"SLIDESHOW_RESOLUTION": "",
|
"SLIDESHOW_RESOLUTION": "",
|
||||||
"SLIDESHOW_PALETTE": "/tmp/.slideshow.palette",
|
"SLIDESHOW_PALETTE": "",
|
||||||
"SLIDESHOW_PALETTE_ALGORITHM": "",
|
"SLIDESHOW_PALETTE_ALGORITHM": "",
|
||||||
"SLIDESHOW_PALETTE_COLORS": "",
|
"SLIDESHOW_PALETTE_COLORS": "",
|
||||||
"SLIDESHOW_SCRIPT": "",
|
"SLIDESHOW_SCRIPT": "",
|
||||||
|
|
|
@ -66,10 +66,10 @@ func setBackground(name string, waitgroup *sync.WaitGroup) {
|
||||||
// encapsulated method to set the background image in a goroutine
|
// encapsulated method to set the background image in a goroutine
|
||||||
func exportColorPalette(name string, waitgroup *sync.WaitGroup) {
|
func exportColorPalette(name string, waitgroup *sync.WaitGroup) {
|
||||||
timestamp := time.Now().UnixMilli()
|
timestamp := time.Now().UnixMilli()
|
||||||
|
defer waitgroup.Done()
|
||||||
if !config.IsPaletteSet() {
|
if !config.IsPaletteSet() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer waitgroup.Done()
|
|
||||||
if config.IsScriptStagePrePalette() {
|
if config.IsScriptStagePrePalette() {
|
||||||
runScript(false)
|
runScript(false)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue