Revert "Defer closing of xmpp connection."

This reverts commit feaa866e0e.
This commit is contained in:
Martin Dosch 2023-07-29 11:28:47 +02:00
parent feaa866e0e
commit 9c80647d91
No known key found for this signature in database
GPG Key ID: 52A57CFCE13D657D

View File

@ -446,7 +446,7 @@ func main() {
signal.Notify(c, os.Interrupt)
go func() {
for range c {
defer client.Close()
client.Close()
os.Exit(0)
}
}()
@ -613,5 +613,5 @@ func main() {
// Wait for a short time as some messages are not delivered by the server
// if the connection is closed immediately after sending a message.
time.Sleep(defaultSleepTime * time.Millisecond)
defer client.Close()
client.Close()
}