go: Sync on WebSocket connection

pull/12/head
Luther Wen Xu 2019-10-13 21:31:06 +07:00
parent 4be6408655
commit 88087e4c81
Signed by: chanbakjsd
GPG Key ID: B7D77E3E9D102B70
1 changed files with 1 additions and 0 deletions

@ -12,6 +12,7 @@ var connectedUsers = make(map[string]bool)
func newSession(who *websocket.Conn) {
clients[who] = true
who.WriteMessage(websocket.TextMessage, []byte("sync"))
}
func disconnectSession(who *websocket.Conn) {