Skip to content

Commit

Permalink
fix: return early if ConnectionStatus failed
Browse files Browse the repository at this point in the history
The goroutine should return early and not attempt to send an empty
message if an error is returned from ConnectionStatus.

Signed-off-by: Link Dupont <[email protected]>
  • Loading branch information
subpop committed Jan 27, 2022
1 parent 14f47b9 commit 95a38a2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/yggd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ func main() {
msg, err := client.ConnectionStatus()
if err != nil {
log.Errorf("cannot get connection status: %v", err)
return
}
if err = client.SendConnectionStatusMessage(msg); err != nil {
log.Errorf("cannot send connection status: %v", err)
Expand Down

0 comments on commit 95a38a2

Please sign in to comment.