改名
This commit is contained in:
@@ -197,12 +197,16 @@ class Snowflake
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Server|\Swoole\Http\Server
|
* @return Server|null
|
||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
public static function getWebSocket()
|
public static function getWebSocket()
|
||||||
{
|
{
|
||||||
return static::app()->get('server')->getServer();
|
$server = static::app()->get('server')->getServer();
|
||||||
|
if (!($server instanceof Server)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return $server;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user