mirror of
https://github.com/predis/predis.git
synced 2026-09-13 03:47:03 +00:00
Apply fixes on error responses from sentinel.
Fixes manually picked from @djagya's fork, thanks for spotting!
This commit is contained in:
@@ -211,6 +211,10 @@ class SentinelReplication extends MasterSlaveReplication
|
||||
throw new ServerException('ERR No such master with that name');
|
||||
}
|
||||
|
||||
if ($payload instanceof ErrorResponseInterface) {
|
||||
throw new ServerException($payload->getMessage());
|
||||
}
|
||||
|
||||
return array(
|
||||
'host' => $payload[0],
|
||||
'port' => $payload[1],
|
||||
@@ -235,7 +239,7 @@ class SentinelReplication extends MasterSlaveReplication
|
||||
);
|
||||
|
||||
if ($payload instanceof ErrorResponseInterface) {
|
||||
throw new ServerException($response->getMessage());
|
||||
throw new ServerException($payload->getMessage());
|
||||
}
|
||||
|
||||
foreach ($payload as $slave) {
|
||||
|
||||
Reference in New Issue
Block a user