Skip to content

Commit

Permalink
Merge pull request #2 from benishor/master
Browse files Browse the repository at this point in the history
Fixed cwdaemon not sending text
  • Loading branch information
ftl committed Feb 9, 2024
2 parents 79b75c7 + 25b55be commit 7791f01
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/cwdaemon/cwdaemon.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package cwdaemon

import (
"log"

"github.com/ftl/hamradio/cwclient"

"github.com/ftl/hellocontest/core/network"
Expand Down Expand Up @@ -94,10 +92,14 @@ func (c *Client) Speed(wpm int) {
}

func (c *Client) Send(text string) {
err := c.connect()
if err != nil {
log.Printf("cannot send %q: %v", text, err)
if !c.client.IsConnected() {
if c.connected {
c.connected = false
c.emitConnectionChanged(false)
}
return
}
c.client.Send(text)
}

func (c *Client) Abort() {
Expand Down

0 comments on commit 7791f01

Please sign in to comment.