Abort the async download of the bulk dataset while SYNC-ing with master. * Never call this function directly, use cancelReplicationHandshake() instead. */
| 3846 | * Never call this function directly, use cancelReplicationHandshake() instead. |
| 3847 | */ |
| 3848 | void replicationAbortSyncTransfer(redisMaster *mi) { |
| 3849 | serverAssert(mi->repl_state == REPL_STATE_TRANSFER); |
| 3850 | undoConnectWithMaster(mi); |
| 3851 | if (mi->repl_transfer_fd!=-1) { |
| 3852 | close(mi->repl_transfer_fd); |
| 3853 | bg_unlink(mi->repl_transfer_tmpfile); |
| 3854 | zfree(mi->repl_transfer_tmpfile); |
| 3855 | mi->repl_transfer_tmpfile = NULL; |
| 3856 | mi->repl_transfer_fd = -1; |
| 3857 | } |
| 3858 | } |
| 3859 | |
| 3860 | /* This function aborts a non blocking replication attempt if there is one |
| 3861 | * in progress, by canceling the non-blocking connect attempt or |
no test coverage detected