Don't sleep on server between messages
This commit is contained in:
parent
3d9a31f4af
commit
a8574dfebe
@ -57,7 +57,6 @@ func clientConnected(w http.ResponseWriter, r *http.Request) {
|
|||||||
c.WriteMessage(websocket.TextMessage, []byte("authenticated"))
|
c.WriteMessage(websocket.TextMessage, []byte("authenticated"))
|
||||||
|
|
||||||
for {
|
for {
|
||||||
time.Sleep(25 * time.Millisecond)
|
|
||||||
_, message, err := c.ReadMessage()
|
_, message, err := c.ReadMessage()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("read:", err)
|
log.Println("read:", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user