MCPcopy Create free account
hub / github.com/apache/trafficserver / accept

Method accept

src/mgmt/rpc/server/IPCSocketServer.cc:262–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262int
263IPCSocketServer::accept(std::error_code &ec) const
264{
265 int ret{-1};
266
267 for (int retries = 0; retries < _conf.maxRetriesOnTransientErrors; retries++) {
268 ret = ::accept(_socket, 0, 0);
269 if (ret >= 0) {
270 return ret;
271 }
272 if (!check_for_transient_errors()) {
273 ec = std::make_error_code(static_cast<std::errc>(errno));
274 return ret;
275 }
276 }
277
278 if (ret < 0) {
279 // seems that we have reached the max retries.
280 ec = InternalError::MAX_TRANSIENT_ERRORS_HANDLED;
281 }
282
283 return ret;
284}
285
286void
287IPCSocketServer::bind(std::error_code &ec)

Callers 1

runMethod · 0.95

Calls 2

make_error_codeFunction · 0.70

Tested by

no test coverage detected