- xbt_assert(xbt_dynar_length(p->pending_sends) == 0, "Shutdown failed, sends still pending after deadline");
+ XBT_DEBUG("Waiting for sends to finish before shutdown...");
+ MSG_comm_waitall(comms, size, PEER_SHUTDOWN_DEADLINE);
+
+ for (idx = 0; idx < size; idx++) {
+ MSG_comm_destroy(comms[idx]);
+ }
+
+ xbt_free(comms);
+}
+
+void peer_delete(peer_t p)
+{
+ xbt_dynar_free(&p->pending_recvs);