1
0

Oh, if http server stop fail, then most listened song will not be saved. Fix that.

This commit is contained in:
Alexander Andreev 2023-03-13 02:20:57 +04:00
parent 4e16f2b3ed
commit acd0087ddf
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -86,9 +86,9 @@ func main() {
<-doneSignal
os.WriteFile(config.MostListenedSongPath, radio.StoreMostListenedSong(), fs.ModePerm)
if err := srv.Stop(); err != nil {
log.Fatalln(err)
}
os.WriteFile(config.MostListenedSongPath, radio.StoreMostListenedSong(), fs.ModePerm)
}