| 3904 | } |
| 3905 | |
| 3906 | void disconnectMaster(redisMaster *mi) |
| 3907 | { |
| 3908 | if (mi->master) { |
| 3909 | if (FCorrectThread(mi->master)) { |
| 3910 | // This will cache the master and do all that fancy stuff |
| 3911 | if (!freeClient(mi->master) && mi->master) |
| 3912 | replicationCreateCachedMasterClone(mi); |
| 3913 | } else { |
| 3914 | // We're not on the same thread so we can't use the freeClient method, instead we have to clone the master |
| 3915 | // and cache that clone |
| 3916 | replicationCreateCachedMasterClone(mi); |
| 3917 | } |
| 3918 | } |
| 3919 | } |
| 3920 | |
| 3921 | /* Set replication to the specified master address and port. */ |
| 3922 | struct redisMaster *replicationAddMaster(char *ip, int port) { |
no test coverage detected