summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 62bcef8)
raw | patch | inline | side by side (parent: 62bcef8)
author | Sebastian Harl <sh@tokkee.org> | |
Mon, 15 Dec 2014 20:22:16 +0000 (21:22 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Mon, 15 Dec 2014 20:22:16 +0000 (21:22 +0100) |
src/frontend/connection.c | patch | blob | history |
index 09f906c045183fc9ab4e6d59b538580d7eed5e1f..55843fd049d9e2569c24b8d42c6d20776039929d 100644 (file)
}
sdb_log(SDB_LOG_DEBUG, "frontend: Closing connection %s", obj->name);
- if (conn->fd >= 0)
- close(conn->fd);
- conn->fd = -1;
+ sdb_connection_close(conn);
if (conn->username)
free(conn->username);
if ((errno == EAGAIN) || (errno == EWOULDBLOCK))
break;
- close(conn->fd);
- conn->fd = -1;
+ sdb_connection_close(conn);
return (int)status;
}
else if (! status) /* EOF */
/* tell other code that there was a problem and, more importantly,
* make sure we don't try to send further logs to the connection */
- close(conn->fd);
- conn->fd = -1;
+ sdb_connection_close(conn);
conn->ready = 0;
sdb_log(SDB_LOG_ERR, "frontend: Failed to send msg "