Sending messages without a goroutine

This commit is contained in:
claudemiro
2016-03-21 20:05:30 -03:00
parent e15a8a84e2
commit abf9a980eb
+1 -5
View File
@@ -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)
}