@@ -48,7 +48,7 @@ abstract class AbstractRedisClient {
4848 'clusters ' => [],
4949 'init_on_start ' => false ,
5050 'init_on_error_moved ' => false ,
51- 'timeout_on_error_tryagain ' => 0.25 ,
51+ 'timeout_on_error_tryagain ' => 0.05 ,
5252 ],
5353 ];
5454
@@ -102,12 +102,22 @@ protected function getConfig($param = null) {
102102 return isset ($ this ->config [$ param ]) ? $ this ->config [$ param ] : null ;
103103 }
104104
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+
105115 /**
106116 * @return ProtocolInterface
107117 */
108118 protected function getProtocol () {
109119 if (!$ this ->Protocol ) {
110- $ this ->Protocol = ProtocolFactory:: createRedisProtocol ($ this , $ this ->getConfig ());
120+ $ this ->Protocol = $ this -> createProtocol ($ this , $ this ->getConfig ());
111121 if ($ this ->ClusterMap ) {
112122 $ this ->ClusterMap ->addProtocol ($ this ->Protocol );
113123 }
@@ -177,7 +187,7 @@ protected function executeProtocolCommand(ProtocolInterface $Protocol, array $co
177187 if ($ response instanceof AskResponseException) {
178188 $ config = $ this ->getConfig ();
179189 $ config ['server ' ] = $ response ->getServer ();
180- $ TempRedisProtocol = ProtocolFactory:: createRedisProtocol ($ this , $ config );
190+ $ TempRedisProtocol = $ this -> createProtocol ($ this , $ config );
181191 $ TempRedisProtocol ->send (['ASKING ' ]);
182192 return $ this ->executeProtocolCommand ($ TempRedisProtocol , $ command , $ params );
183193 }
@@ -291,6 +301,7 @@ public function executeRaw($structure) {
291301 }
292302
293303 /**
304+ * @deprecated
294305 * Command will parsed by the client, before sent to server
295306 * @param string $command
296307 * @return mixed
@@ -300,6 +311,7 @@ public function executeRawString($command) {
300311 }
301312
302313 /**
314+ * @deprecated
303315 * @param string $command
304316 * @return string[]
305317 */
0 commit comments