Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
evalor committed Mar 7, 2019
1 parent 456a042 commit 6d1b2b2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion App/WebSocket/WebSocketEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static function onOpen(\swoole_server $server, \swoole_http_request $req)
static function onClose(\swoole_server $server, int $fd, int $reactorId)
{
$info = $server->connection_info($fd);
if ($info['websocket_status'] !== 0) {
if (isset($info['websocket_status']) && $info['websocket_status'] !== 0) {
$redisPool = PoolManager::getInstance()->getPool(RedisPool::class);
$redis = $redisPool->getObj();
if ($redis instanceof RedisPoolObject) {
Expand Down
7 changes: 3 additions & 4 deletions dev.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@
'LISTEN_ADDRESS' => '127.0.0.1',
'HOST' => '127.0.0.1',
'PORT' => 9500,
'EXPIRE' => '120',
'AUTH' => null,
'PUSH_LOG' => true,
'USER' => 'root',
'PASSWORD' => '123456'
],
'FAST_CACHE' => [
'PROCESS_NUM' => 0,
Expand All @@ -49,4 +48,4 @@
'HOST' => '127.0.0.1',
'PORT' => 6379
]
];
];
13 changes: 10 additions & 3 deletions produce.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,20 @@
'LISTEN_ADDRESS' => '127.0.0.1',
'HOST' => '127.0.0.1',
'PORT' => 9500,
'EXPIRE' => '120',
'AUTH' => null,
'PUSH_LOG' => true,
'USER' => 'root',
'PASSWORD' => '123456'
],
'FAST_CACHE' => [
'PROCESS_NUM' => 0,
'BACKLOG' => 256,
],
'DISPLAY_ERROR' => true,
'SYSTEM' => [
'WS_SERVER_PATH' => 'ws://127.0.0.1:9501',
'LAST_MESSAGE_MAX' => 10
],
'REDIS' => [
'HOST' => '127.0.0.1',
'PORT' => 6379
]
];

0 comments on commit 6d1b2b2

Please sign in to comment.