File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ Yii Framework 2 redis extension Change Log
442.0.5 under development
55-----------------------
66
7+ - Bug #37 : Fixed detection of open socket (mirocow)
78- Chg #14 : Added missing ` BLPOP ` to ` $redisCommands ` (samdark)
89
9-
10102.0.4 May 10, 2015
1111------------------
1212
Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ class Connection extends Component
225225 /**
226226 * @var resource redis socket connection
227227 */
228- private $ _socket ;
228+ private $ _socket = false ;
229229
230230
231231 /**
@@ -245,7 +245,7 @@ public function __sleep()
245245 */
246246 public function getIsActive ()
247247 {
248- return $ this ->_socket !== null ;
248+ return $ this ->_socket !== false ;
249249 }
250250
251251 /**
@@ -255,7 +255,7 @@ public function getIsActive()
255255 */
256256 public function open ()
257257 {
258- if ($ this ->_socket !== null ) {
258+ if ($ this ->_socket !== false ) {
259259 return ;
260260 }
261261 $ connection = ($ this ->unixSocket ?: $ this ->hostname . ': ' . $ this ->port ) . ', database= ' . $ this ->database ;
@@ -288,7 +288,7 @@ public function open()
288288 */
289289 public function close ()
290290 {
291- if ($ this ->_socket !== null ) {
291+ if ($ this ->_socket !== false ) {
292292 $ connection = ($ this ->unixSocket ?: $ this ->hostname . ': ' . $ this ->port ) . ', database= ' . $ this ->database ;
293293 \Yii::trace ('Closing DB connection: ' . $ connection , __METHOD__ );
294294 $ this ->executeCommand ('QUIT ' );
You can’t perform that action at this time.
0 commit comments