MCPcopy Create free account
hub / github.com/apache/mesos / connect

Method connect

src/resource_provider/http_connection.hpp:238–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236 }
237
238 void connect(const id::UUID& _connectionId)
239 {
240 // It is possible that a new endpoint was detected while we were
241 // waiting to establish a connection with the old master.
242 if (connectionId != _connectionId) {
243 VLOG(1) << "Ignoring connection attempt from stale connection";
244 return;
245 }
246
247 CHECK_SOME(endpoint);
248 CHECK_EQ(State::DISCONNECTED, state);
249
250 state = State::CONNECTING;
251
252 // We create two persistent connections here, one for subscribe
253 // call/streaming response and another for non-subscribe
254 // calls/responses.
255 collect(
256 process::http::connect(endpoint.get()),
257 process::http::connect(endpoint.get()))
258 .onAny(defer(self(), &Self::connected, connectionId.get(), lambda::_1));
259 }
260
261 void connected(
262 const id::UUID& _connectionId,

Callers

nothing calls this directly

Calls 4

collectFunction · 0.85
deferFunction · 0.85
connectFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected