Improve readability

This commit is contained in:
Fred Boniface 2024-04-24 23:08:51 +01:00
parent aef52be1e8
commit f3745da86e
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,8 @@
package messaging package messaging
import ( import (
"time"
"git.fjla.uk/owlboard/timetable-mgr/helpers" "git.fjla.uk/owlboard/timetable-mgr/helpers"
"git.fjla.uk/owlboard/timetable-mgr/log" "git.fjla.uk/owlboard/timetable-mgr/log"
"github.com/go-stomp/stomp/v3" "github.com/go-stomp/stomp/v3"
@ -17,7 +19,7 @@ func StompInit(cfg *helpers.Configuration) {
func dial(user, pass string) *stomp.Conn { func dial(user, pass string) *stomp.Conn {
conn, err := stomp.Dial("tcp", "publicdatafeeds.networkrail.co.uk:61618", conn, err := stomp.Dial("tcp", "publicdatafeeds.networkrail.co.uk:61618",
stomp.ConnOpt.Login(user, pass), stomp.ConnOpt.Login(user, pass),
stomp.ConnOpt.HeartBeat(15000, 15000), stomp.ConnOpt.HeartBeat(15*time.Second, 15*time.Second),
stomp.ConnOpt.Header("client-id", user+"-mq-client"), stomp.ConnOpt.Header("client-id", user+"-mq-client"),
) )
if err != nil { if err != nil {