Fixed delay of stanca presence messages

This commit is contained in:
2021-09-23 12:34:54 +02:00
parent cbb8774382
commit 56d3ec3f90
2 changed files with 2 additions and 3 deletions

View File

@@ -117,12 +117,11 @@ func Init() {
}
go func() {
defer wg.Done()
statusMesageDelay := int64(rand.Intn(appConfig.AppConfig.GeneralOptions.CommandReplyDelay))
log.Printf("DELAYING FOR: %v", statusMesageDelay*1000000000)
// Delay For two seccond to allow all clients to connect
time.Sleep(time.Duration(statusMesageDelay * 1000000000))
defer wg.Done()
client, err := xmpp.NewClient(&xmppClient.Config, xmppService.Router, errorHandler)