diff --git a/bin/deploy.sh b/bin/deploy.sh index 15778cd7..f84b7d97 100755 --- a/bin/deploy.sh +++ b/bin/deploy.sh @@ -24,6 +24,7 @@ ssh -q "$TARGET" ls -lah "$SERVER_BIN_DIR" echo "syncing client $VERSION" rsync -a --delete --delete-excluded "$MNML_PATH/client/dist/" "$TARGET:$CLIENT_DIST_DIR/$VERSION/" ssh -q "$TARGET" ln -nfs "$CLIENT_DIST_DIR/$VERSION" "$CLIENT_PUBLIC_DIR" +ssh -q "$TARGET" ls -lah "$CLIENT_DIST_DIR" echo "restarting mnml service" ssh -q -t "$TARGET" sudo service mnml restart && sleep 1 && systemctl --no-pager status mnml diff --git a/client/src/socket.jsx b/client/src/socket.jsx index e19c5c4b..d4a0c421 100644 --- a/client/src/socket.jsx +++ b/client/src/socket.jsx @@ -223,8 +223,8 @@ function createSocket(events) { ItemInfo: onItemInfo, Pong: onPong, - QueueRequested: () => console.log('pvp queue request received'), - QueueJoined: () => console.log('you have joined the pvp queue'), + QueueRequested: () => events.notify('pvp queue request received'), + QueueJoined: () => events.notify('you have joined the pvp queue'), Error: errHandler, }; diff --git a/server/src/events.rs b/server/src/events.rs index f37b97bd..c6cf57a5 100644 --- a/server/src/events.rs +++ b/server/src/events.rs @@ -192,7 +192,13 @@ impl Events { }, None => { info!("joined game queue id={:?} account={:?}", req.id, req.account); - Some(req) + match self.clients.get(&req.id) { + Some(ref c) => { + c.tx.send(RpcMessage::QueueJoined(()))?; + Some(req) + }, + None => return Err(format_err!("missing client client={:?}", req.id)), + } }, };