This commit is contained in:
aozhiwei 2023-12-26 17:38:19 +08:00
parent f40ebe1918
commit 37c6a942ae

View File

@ -119,12 +119,15 @@ class MatchController extends BaseAuthedController {
$currMatchDb = $this->readCurrMatchTeam($r);
if (empty($currMatchDb)) {
$currMatchDb = array(
$teamUuid => array(
'current_team' => $teamUuid,
'match_time' => $this->_getNowTime()
)
);
$r->set(MATCH_CURRENT_TEAM_KEY, json_encode($currMatchDb));
$this->refreshKeyExpire($r, MATCH_CURRENT_TEAM_KEY, 1000*600);
} else {
$currMatchDb = json_decode($currMatchDb, true);
if ($currMatchDb['current_team'] != $teamUuid) {
$this->matchOk($r, $teamUuid, $currMatchDb);
$this->fillMatchInfo($r, $teamUuid, $matchInfo, $this->readMatchOk($r, $teamUuid));