Abort the async download of the bulk dataset while SYNC-ing with master. * Never call this function directly, use cancelReplicationHandshake() instead. */
| 2565 | * Never call this function directly, use cancelReplicationHandshake() instead. |
| 2566 | */ |
| 2567 | void replicationAbortSyncTransfer(void) { |
| 2568 | serverAssert(server.repl_state == REPL_STATE_TRANSFER); |
| 2569 | undoConnectWithMaster(); |
| 2570 | if (server.repl_transfer_fd!=-1) { |
| 2571 | close(server.repl_transfer_fd); |
| 2572 | bg_unlink(server.repl_transfer_tmpfile); |
| 2573 | zfree(server.repl_transfer_tmpfile); |
| 2574 | server.repl_transfer_tmpfile = NULL; |
| 2575 | server.repl_transfer_fd = -1; |
| 2576 | } |
| 2577 | } |
| 2578 | |
| 2579 | /* This function aborts a non blocking replication attempt if there is one |
| 2580 | * in progress, by canceling the non-blocking connect attempt or |
no test coverage detected