| 650 | * -------------------------------------------------------------------------- */ |
| 651 | |
| 652 | clusterLink *createClusterLink(clusterNode *node) { |
| 653 | clusterLink *link = (clusterLink*)zmalloc(sizeof(*link), MALLOC_LOCAL); |
| 654 | link->ctime = mstime(); |
| 655 | link->sndbuf = sdsempty(); |
| 656 | link->rcvbuf = (char*)zmalloc(link->rcvbuf_alloc = RCVBUF_INIT_LEN); |
| 657 | link->rcvbuf_len = 0; |
| 658 | link->node = node; |
| 659 | link->conn = NULL; |
| 660 | return link; |
| 661 | } |
| 662 | |
| 663 | /* Free a cluster link, but does not free the associated node of course. |
| 664 | * This function will just make sure that the original node associated |
no test coverage detected