X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dbef7c255d1e1bebb88d6986817557648289aec8..b8df87e176f27b25534f27d7e240defa32ca35bc:/src/mc/remote/Channel.cpp diff --git a/src/mc/remote/Channel.cpp b/src/mc/remote/Channel.cpp index 6c4000dae3..7594e5e68b 100644 --- a/src/mc/remote/Channel.cpp +++ b/src/mc/remote/Channel.cpp @@ -1,10 +1,10 @@ -/* Copyright (c) 2015-2016. The SimGrid Team. +/* Copyright (c) 2015-2019. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include +#include #include #include @@ -29,11 +29,10 @@ Channel::~Channel() int Channel::send(const void* message, size_t size) const { XBT_DEBUG("Send %s", MC_message_type_name(*(e_mc_message_type*)message)); - while (::send(this->socket_, message, size, 0) == -1) - if (errno == EINTR) - continue; - else + while (::send(this->socket_, message, size, 0) == -1) { + if (errno != EINTR) return errno; + } return 0; }