added test for out of order conf, found bug that needs fixing

This commit is contained in:
sm
2013-08-26 23:09:39 -07:00
parent ad13aed9fd
commit 0512bb7664
2 changed files with 53 additions and 2 deletions
+1 -2
View File
@@ -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