Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "Treat ECONNRESET like a normal connection close."
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 3 Apr 2023 14:38:48 +0000 (16:38 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 3 Apr 2023 14:40:21 +0000 (16:40 +0200)
This reverts commit 2fbcc71ab230e6a05e64189f6bd7c49c1df31907.

It was erroneously pushed before testing. Sorry for the noise.
[ci-skip]

src/mc/remote/CheckerSide.cpp

index ab9feec..2e64dd8 100644 (file)
@@ -131,15 +131,9 @@ void CheckerSide::setup_events(bool socket_only)
           std::array<char, MC_MESSAGE_LENGTH> buffer;
           ssize_t size = recv(checker->get_channel().get_socket(), buffer.data(), buffer.size(), MSG_DONTWAIT);
           if (size == -1) {
-            if (errno == ECONNRESET) {
-              XBT_DEBUG("Channel::receive failure: %s", strerror(errno));
-              size = 0; // Connection was closed
-            } else {
-              XBT_ERROR("Channel::receive failure: %s", strerror(errno));
-              if (errno != EAGAIN)
-                throw simgrid::xbt::errno_error();
-              return;
-            }
+            XBT_ERROR("Channel::receive failure: %s", strerror(errno));
+            if (errno != EAGAIN)
+              throw simgrid::xbt::errno_error();
           }
 
           if (size == 0) // The app closed the socket. It must be dead by now.