added test for out of order conf, found bug that needs fixing
This commit is contained in:
+1
-2
@@ -3,7 +3,6 @@ package main
|
||||
import (
|
||||
"code.google.com/p/go.net/websocket"
|
||||
"errors"
|
||||
"log"
|
||||
)
|
||||
|
||||
// > identify
|
||||
@@ -114,9 +113,9 @@ func Negociate(ws *websocket.Conn, id string, width, height float64) (*Config, e
|
||||
for {
|
||||
err = websocket.JSON.Receive(ws, &conf)
|
||||
if err != nil {
|
||||
log.Print(err)
|
||||
return nil, err
|
||||
}
|
||||
// TODO: verify conf's type
|
||||
if conf.Stats.valid() {
|
||||
_ = websocket.JSON.Send(ws, NewHandshake(id, true))
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user