Created
May 26, 2020 16:11
-
-
Save avalchev94/035f24f298b56d0f3f726e74e09c9e91 to your computer and use it in GitHub Desktop.
How would you fix me?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client := &Client{ | |
username: ...., | |
send: make(chan *profiles.Profile, 100), | |
} | |
clients[clientId] = client | |
// ....... | |
for _, client := range clients { | |
select { | |
case client.send <- profileChange: | |
logger.Debugf("profile change send...") | |
default: | |
logger.Errorf("failed to send profile change, channel is full") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment