@@ -48,7 +48,7 @@ abstract class AbstractRedisClient {
48
48
'clusters ' => [],
49
49
'init_on_start ' => false ,
50
50
'init_on_error_moved ' => false ,
51
- 'timeout_on_error_tryagain ' => 0.25 ,
51
+ 'timeout_on_error_tryagain ' => 0.05 ,
52
52
],
53
53
];
54
54
@@ -102,12 +102,22 @@ protected function getConfig($param = null) {
102
102
return isset ($ this ->config [$ param ]) ? $ this ->config [$ param ] : null ;
103
103
}
104
104
105
+ /**
106
+ * @param AbstractRedisClient $RedisClient
107
+ * @param $config
108
+ * @return \RedisClient\Protocol\ProtocolInterface
109
+ */
110
+ protected function createProtocol (AbstractRedisClient $ RedisClient , $ config )
111
+ {
112
+ return ProtocolFactory::createRedisProtocol ($ RedisClient , $ config );
113
+ }
114
+
105
115
/**
106
116
* @return ProtocolInterface
107
117
*/
108
118
protected function getProtocol () {
109
119
if (!$ this ->Protocol ) {
110
- $ this ->Protocol = ProtocolFactory:: createRedisProtocol ($ this , $ this ->getConfig ());
120
+ $ this ->Protocol = $ this -> createProtocol ($ this , $ this ->getConfig ());
111
121
if ($ this ->ClusterMap ) {
112
122
$ this ->ClusterMap ->addProtocol ($ this ->Protocol );
113
123
}
@@ -177,7 +187,7 @@ protected function executeProtocolCommand(ProtocolInterface $Protocol, array $co
177
187
if ($ response instanceof AskResponseException) {
178
188
$ config = $ this ->getConfig ();
179
189
$ config ['server ' ] = $ response ->getServer ();
180
- $ TempRedisProtocol = ProtocolFactory:: createRedisProtocol ($ this , $ config );
190
+ $ TempRedisProtocol = $ this -> createProtocol ($ this , $ config );
181
191
$ TempRedisProtocol ->send (['ASKING ' ]);
182
192
return $ this ->executeProtocolCommand ($ TempRedisProtocol , $ command , $ params );
183
193
}
@@ -291,6 +301,7 @@ public function executeRaw($structure) {
291
301
}
292
302
293
303
/**
304
+ * @deprecated
294
305
* Command will parsed by the client, before sent to server
295
306
* @param string $command
296
307
* @return mixed
@@ -300,6 +311,7 @@ public function executeRawString($command) {
300
311
}
301
312
302
313
/**
314
+ * @deprecated
303
315
* @param string $command
304
316
* @return string[]
305
317
*/
0 commit comments