mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 04:16:13 +00:00
Fixing bug with Live Reload where it broadcast instead of sending the handshake
This commit is contained in:
1 parent
57ad3abe7b
commit
79dd1d02b4
1 file changed
+5
-5
@@ -35,11 +35,11 @@ func (c *connection) reader() {
|
|||||||
}
|
}
|
||||||
switch true {
|
switch true {
|
||||||
case bytes.Contains(message, []byte(`"command":"hello"`)):
|
case bytes.Contains(message, []byte(`"command":"hello"`)):
|
||||||
wsHub.broadcast <- []byte(`{
|
c.send <- []byte(`{
|
||||||
"command": "hello",
|
"command": "hello",
|
||||||
"protocols": [ "http://livereload.com/protocols/official-7" ],
|
"protocols": [ "http://livereload.com/protocols/official-7" ],
|
||||||
"serverName": "Hugo"
|
"serverName": "Hugo"
|
||||||
}`)
|
}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
c.ws.Close()
|
c.ws.Close()
|
||||||
|
|||||||
Reference in new issue
Block a user