Skip to content
This repository has been archived by the owner on Nov 2, 2021. It is now read-only.

Commit

Permalink
MOD: setting keepalive for an new connection
Browse files Browse the repository at this point in the history
  • Loading branch information
liubin8 committed Oct 11, 2015
1 parent d8a0ed5 commit 789134f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/fc_server.c
Expand Up @@ -77,6 +77,12 @@ server_accept(struct context *ctx, struct conn *s)
strerror(errno));
}

status = fc_set_keepalive(c->sd);
if (status < 0) {
log_warn("set tcp keepalive on c %d failed, ignored: %s", sd,
strerror(errno));
}

status = event_add_conn(ctx->ep, c);
if (status < 0) {
log_error("event add conn e %d c %d failed: %s", ctx->ep, sd,
Expand Down

0 comments on commit 789134f

Please sign in to comment.