From 83bb549c419af1aadd3d7412b8e900eaa842f556 Mon Sep 17 00:00:00 2001 From: "nedim.uka" Date: Thu, 16 Sep 2021 10:41:55 +0200 Subject: [PATCH] Add delay so that clients can setup properly --- services/xmppsService.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/xmppsService.go b/services/xmppsService.go index 228d9a1..9718ed1 100644 --- a/services/xmppsService.go +++ b/services/xmppsService.go @@ -8,13 +8,14 @@ import ( "log" "os" "strconv" + "time" appConfig "github.com/xmpploadtesting/config" "gosrc.io/xmpp" "gosrc.io/xmpp/stanza" ) -const rolingStockPresenceMessage = `ROLLING STOCK PRESENCE MESSAGE\n +const rolingStockPresenceMessage = `ROLLING STOCK PRESENCE MESSAGE { "serial": "79101X02Y0029450001CJ2000", "model": "VEN032FSNWM00", @@ -129,6 +130,8 @@ func Init() { }() } + // Delay For one seccond to allow all clients to connect + time.Sleep(time.Duration(1000000000)) }