This function sets the down_after_period field value in 'master' to all * the slaves and sentinel instances connected to this master. */
| 1717 | /* This function sets the down_after_period field value in 'master' to all |
| 1718 | * the slaves and sentinel instances connected to this master. */ |
| 1719 | void sentinelPropagateDownAfterPeriod(sentinelRedisInstance *master) { |
| 1720 | dictIterator *di; |
| 1721 | dictEntry *de; |
| 1722 | int j; |
| 1723 | dict *d[] = {master->slaves, master->sentinels, NULL}; |
| 1724 | |
| 1725 | for (j = 0; d[j]; j++) { |
| 1726 | di = dictGetIterator(d[j]); |
| 1727 | while((de = dictNext(di)) != NULL) { |
| 1728 | sentinelRedisInstance *ri = (sentinelRedisInstance*)dictGetVal(de); |
| 1729 | ri->down_after_period = master->down_after_period; |
| 1730 | } |
| 1731 | dictReleaseIterator(di); |
| 1732 | } |
| 1733 | } |
| 1734 | |
| 1735 | /* This function is used in order to send commands to Redis instances: the |
| 1736 | * commands we send from Sentinel may be renamed, a common case is a master |
no test coverage detected