You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2016/11/29 21:29:47 UTC

[14/14] mesos git commit: Updated http::Connection::disconnect to do a complete socket shutdown.

Updated http::Connection::disconnect to do a complete socket shutdown.

Review: https://reviews.apache.org/r/54114


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/913efc85
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/913efc85
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/913efc85

Branch: refs/heads/master
Commit: 913efc85da4632c56ee376bb403c1761bb4945ee
Parents: 4417a4e
Author: Benjamin Hindman <be...@gmail.com>
Authored: Sun Nov 27 14:25:50 2016 -0800
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Tue Nov 29 12:19:17 2016 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/src/http.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/913efc85/3rdparty/libprocess/src/http.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/http.cpp b/3rdparty/libprocess/src/http.cpp
index 03512c6..8a10dca 100644
--- a/3rdparty/libprocess/src/http.cpp
+++ b/3rdparty/libprocess/src/http.cpp
@@ -1084,9 +1084,8 @@ public:
 
   Future<Nothing> disconnect(const Option<string>& message = None())
   {
-    Try<Nothing> shutdown = socket.shutdown();
-
-    disconnection.set(Nothing());
+    Try<Nothing> shutdown = socket.shutdown(
+        network::Socket::Shutdown::READ_WRITE);
 
     // If a response is still streaming, we send EOF to
     // the decoder in order to fail the pipe reader.
@@ -1101,6 +1100,8 @@ public:
       pipeline.pop();
     }
 
+    disconnection.set(Nothing());
+
     return shutdown;
   }