Skip to content

Commit

Permalink
Fix onClose session when use gatewayClient
Browse files Browse the repository at this point in the history
  • Loading branch information
walkor authored Jun 26, 2017
1 parent 73d803b commit a75f011
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BusinessWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public function onGatewayMessage($connection, $data)
'GATEWAY_CLIENT_ID' => Context::$client_id,
);
// 检查session版本,如果是过期的session数据则拉取最新的数据
if (isset($this->_sessionVersion[Context::$client_id]) && $this->_sessionVersion[Context::$client_id] !== crc32($data['ext_data'])) {
if ($cmd !== GatewayProtocol::CMD_ON_CLOSE && isset($this->_sessionVersion[Context::$client_id]) && $this->_sessionVersion[Context::$client_id] !== crc32($data['ext_data'])) {
$_SESSION = Context::$old_session = \GatewayWorker\Lib\Gateway::getSession(Context::$client_id);
} else {
if (!isset($this->_sessionVersion[Context::$client_id])) {
Expand Down

0 comments on commit a75f011

Please sign in to comment.