ref: 79dd1d02b49bc7a296e2eb607c29192709eeab06
parent: 57ad3abe7bcbe958450a66f6f487c05f8222cf33
author: spf13 <[email protected]>
date: Tue May 27 14:35:12 EDT 2014
Fixing bug with Live Reload where it broadcast instead of sending the handshake
--- a/livereload/connection.go
+++ b/livereload/connection.go
@@ -35,11 +35,11 @@
}
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()