aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/game/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'backend/game/client.go')
-rw-r--r--backend/game/client.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/backend/game/client.go b/backend/game/client.go
index 7cd66a4..fa699ce 100644
--- a/backend/game/client.go
+++ b/backend/game/client.go
@@ -12,12 +12,13 @@ type playerClient struct {
hub *gameHub
conn *websocket.Conn
s2cMessages chan playerMessageS2C
+ playerID int
}
// Receives messages from the client and sends them to the hub.
func (c *playerClient) readPump() {
defer func() {
- log.Printf("closing client")
+ log.Printf("closing player client")
c.hub.unregisterPlayer <- c
c.conn.Close()
}()
@@ -87,7 +88,7 @@ func (c *watcherClient) writePump() {
defer func() {
ticker.Stop()
c.conn.Close()
- log.Printf("closing watcher")
+ log.Printf("closing watcher client")
c.hub.unregisterWatcher <- c
}()
for {