Open odeke-em opened 1 year ago
The code in https://github.com/danielgross/whatsapp-gpt/blob/d12693276e1e88d5d335276aa42bcfd849d56023/main.go#L110-L112 creates an unbuffered channel but unfortunately that can cause a signal to be lost. It should be have a capacity of at least 1 given that we are waiting for just 1 signal and the advisory at https://pkg.go.dev/os/signal#Notify
The code in https://github.com/danielgross/whatsapp-gpt/blob/d12693276e1e88d5d335276aa42bcfd849d56023/main.go#L110-L112 creates an unbuffered channel but unfortunately that can cause a signal to be lost. It should be have a capacity of at least 1 given that we are waiting for just 1 signal and the advisory at https://pkg.go.dev/os/signal#Notify