From abf9a980eb5e2d41422ed204e890ffeb5b648e2c Mon Sep 17 00:00:00 2001 From: claudemiro Date: Mon, 21 Mar 2016 20:05:30 -0300 Subject: [PATCH] Sending messages without a goroutine --- ipe/connection.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ipe/connection.go b/ipe/connection.go index 70419dc..9d48463 100644 --- a/ipe/connection.go +++ b/ipe/connection.go @@ -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) }