Fixing bug with Live Reload where it broadcast instead of sending the handshake
authorspf13 <steve.francia@gmail.com>
Tue, 27 May 2014 22:35:12 +0000 (18:35 -0400)
committerspf13 <steve.francia@gmail.com>
Tue, 27 May 2014 22:35:12 +0000 (18:35 -0400)
livereload/connection.go

index 70a7e6d5dc93d6e112893c654d2cf671400cd574..c35a403eebf58334ec7e57941777511f6aca1f8a 100644 (file)
@@ -35,11 +35,11 @@ func (c *connection) reader() {
                }
                switch true {
                case bytes.Contains(message, []byte(`"command":"hello"`)):
-                       wsHub.broadcast <- []byte(`{
-                         "command": "hello",
-                         "protocols": [ "http://livereload.com/protocols/official-7" ],
-                         "serverName": "Hugo"
-                         }`)
+                       c.send <- []byte(`{
+                               "command": "hello",
+                               "protocols": [ "http://livereload.com/protocols/official-7" ],
+                               "serverName": "Hugo"
+                       }`)
                }
        }
        c.ws.Close()