Skip to content

Commit

Permalink
Fix high cpu usage when client is not connected to server
Browse files Browse the repository at this point in the history
  • Loading branch information
hlxid committed Sep 3, 2022
1 parent 12ba9c5 commit d6ebb2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go-client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func main() {

setColor(Color{255, 255, 255}, command)
// Do nothing else.
for {}
select {}
} else {
defer conn.Close()
log.Println("Connected to websocket server.")
Expand Down

0 comments on commit d6ebb2f

Please sign in to comment.