Skip to content
This repository has been archived by the owner on Apr 22, 2022. It is now read-only.

Commit

Permalink
Sending messages without a goroutine
Browse files Browse the repository at this point in the history
  • Loading branch information
dimiro1 committed Mar 21, 2016
1 parent e15a8a8 commit abf9a98
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ipe/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,5 @@ func newConnection(socketID string, s socket) *connection {

// Publish the message to websocket atached to this client
func (conn *connection) Publish(m interface{}) {
go func() {
if err := conn.Socket.WriteJSON(m); err != nil {
log.Errorf("Error publishing message to connection %+v, %s", conn, err)
}
}()
conn.Socket.WriteJSON(m)
}

0 comments on commit abf9a98

Please sign in to comment.