MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / redisCheckConnectDone

Function redisCheckConnectDone

deps/hiredis/net.c:274–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272}
273
274int redisCheckConnectDone(redisContext *c, int *completed) {
275 int rc = connect(c->fd, (const struct sockaddr *)c->saddr, c->addrlen);
276 if (rc == 0) {
277 *completed = 1;
278 return REDIS_OK;
279 }
280 switch (errno) {
281 case EISCONN:
282 *completed = 1;
283 return REDIS_OK;
284 case EALREADY:
285 case EINPROGRESS:
286 case EWOULDBLOCK:
287 *completed = 0;
288 return REDIS_OK;
289 default:
290 return REDIS_ERR;
291 }
292}
293
294int redisCheckSocketError(redisContext *c) {
295 int err = 0, errno_saved = errno;

Callers 2

redisContextWaitReadyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected