This is an automated email from the ASF dual-hosted git repository.

huxing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-php-framework.git

commit c418f0b24a16868083cd71c1d25351ea13a413aa
Author: wangjinxi <[email protected]>
AuthorDate: Wed Jul 17 10:17:08 2019 +0800

    update
---
 common/file/FSOFRedis.php | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/common/file/FSOFRedis.php b/common/file/FSOFRedis.php
index 914e0a9..42a162b 100644
--- a/common/file/FSOFRedis.php
+++ b/common/file/FSOFRedis.php
@@ -169,7 +169,15 @@ class FSOFRedis
     {
         if (!empty($key) && isset($this->m_redis))
         {
-            return $this->getlRange($key);
+            try{
+                return $this->getlRange($key);
+            }catch (\Exception $e){
+                $this->logger->warn('redis current connect excepiton'.' 
|errcode:'.$e->getCode().' |errmsg:'.$e->getMessage());
+                $this->close();
+                //重试一次防止连接成功后,连接断开
+                $this->get_redis();
+                return $this->getlRange($key);
+            }
         }
         else
         {

Reply via email to