mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bmah...@apache.org
Subject mesos git commit: Send an InternalServerError if HttpEvent's response is not satisfied during destruction.
Date Wed, 18 Nov 2015 10:07:05 GMT
Repository: mesos
Updated Branches:
  refs/heads/master 228d7694f -> fb1a62802


Send an InternalServerError if HttpEvent's response is not satisfied during destruction.

Note that this was motivated by the upcoming HTTP authentication
patches. If a process terminates during HTTP authentication, we
will fail to deliver the HttpEvent and this ensures that it is
not left in a pending state. Otherwise, we may stall a pipeline!

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


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

Branch: refs/heads/master
Commit: fb1a628023380851433f9f0bc45e3c1531fe42fb
Parents: 228d769
Author: Alexander Rojas <alexander@mesosphere.io>
Authored: Wed Nov 18 11:01:30 2015 +0100
Committer: Benjamin Mahler <benjamin.mahler@gmail.com>
Committed: Wed Nov 18 11:01:30 2015 +0100

----------------------------------------------------------------------
 3rdparty/libprocess/include/process/event.hpp | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/fb1a6280/3rdparty/libprocess/include/process/event.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/event.hpp b/3rdparty/libprocess/include/process/event.hpp
index 28ce192..60c6152 100644
--- a/3rdparty/libprocess/include/process/event.hpp
+++ b/3rdparty/libprocess/include/process/event.hpp
@@ -128,6 +128,9 @@ struct HttpEvent : Event
   virtual ~HttpEvent()
   {
     delete request;
+
+    // Fail the response in case it wasn't set.
+    response->set(http::InternalServerError());
     delete response;
   }
 


Mime
View raw message