added simple, non-leaking game stop url
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user