This commit is contained in:
2024-11-13 09:19:43 +07:00
parent 10f936838f
commit e99a0a921d
7 changed files with 127 additions and 17 deletions

View File

@ -137,7 +137,9 @@ func (c *TCPClient) ReadLine() {
continue
}
if strings.Contains(message, Cfg.Cluster.LoginPrompt+" \r\n") {
Log.Debugf("Received Message: %s", message)
if strings.Contains(message, Cfg.Cluster.LoginPrompt+"\r\n") || strings.Contains(message, Cfg.Cluster.LoginPrompt+" \r\n") {
Log.Debug("Found login prompt...sending callsign")
c.Write([]byte(c.Login + "\r\n"))
time.Sleep(time.Second * 2)
@ -154,7 +156,7 @@ func (c *TCPClient) ReadLine() {
// Send the spot message to TCP server
if len(c.TCPServer.Clients) > 0 {
if count == 0 {
// wait 3 seconds before sending messages to allow the client to connect
// wait 5 seconds before sending messages to allow the client to connect
time.Sleep(time.Second * 5)
count++
}