Added waiting time before closing connection.

http_upload
Martin Dosch 5 years ago
parent 9a71d8b3e4
commit c845972b1f

@ -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 {

Loading…
Cancel
Save