Otherwise, only the first callback is called and the status of the other finishing flow is not updated.
mysocket->finished = 1;
// cout << "[" << Simulator::Now ().GetSeconds() << "] " << "recv_cb of F[" << mysocket->totalBytes << "] " << endl;
XBT_DEBUG("Stop simulator at %f seconds", Simulator::Now().GetSeconds());
mysocket->finished = 1;
// cout << "[" << Simulator::Now ().GetSeconds() << "] " << "recv_cb of F[" << mysocket->totalBytes << "] " << endl;
XBT_DEBUG("Stop simulator at %f seconds", Simulator::Now().GetSeconds());
+ Simulator::Stop(Seconds(0.0));
+ Simulator::Run();