@ -13,6 +13,7 @@ import (
"os/user"
"strconv"
"strings"
"time"
"github.com/mattn/go-xmpp" // BSD-3-Clause
"github.com/pborman/getopt/v2" // BSD-3-Clause
@ -352,6 +353,10 @@ func main() {
}
// Wait for a short time as some messages are not delievered by the server
// if the connection is closed immediately after sending a message.
time.Sleep(100 * time.Millisecond)
// Close XMPP connection
err = client.Close()
if err != nil {