added simple, non-leaking game stop url

This commit is contained in:
sm
2013-09-08 09:32:24 -07:00
parent b7087adb78
commit f175e45c63
4 changed files with 33 additions and 4 deletions
+6 -1
View File
@@ -34,10 +34,15 @@ func (p *player) sender() {
func (p *player) recv() {
for {
// XXX: need to mark myself as having received something, also binding
// such action to a particular game turn ID
var msg instruction
err := websocket.JSON.Receive(p.ws, &msg)
if err != nil {
log.Print(err)
// TODO: perhaps we could be a bit more precise in the handling of
// this 'error' by selecting on some kill signal channel and this
// json read?
log.Print("problem receiving JSON from player: ", err)
break
}
if msg.MoveTo != nil {