diff --git a/src/aconnect.c b/src/aconnect.c
index 345bc52c8f5e1dde1738c54448883d579031dffb..82085edb06b419dada29e158d3af92bb96bbd9e5 100644 (file)
--- a/src/aconnect.c
+++ b/src/aconnect.c
#include <string.h>
#include <stdio.h>
#include <errno.h>
-#include <sys/socket.h>
struct aconnect {
const struct aconnect_handler *handler;
aconnect_rconnect_success(int fd, void *ctx)
{
struct aconnect *ac = ctx;
- assert(ac->rconnect != NULL);
ac->rconnect = NULL;
ac->fd = fd;
aconnect_rconnect_error(const char *message, void *ctx)
{
struct aconnect *ac = ctx;
- assert(ac->rconnect != NULL);
ac->rconnect = NULL;
ac->handler->error(message, ac->handler_ctx);
ac->handler = handler;
ac->handler_ctx = ctx;
+ *acp = ac;
+
async_rconnect_start(&ac->rconnect, host, port,
&aconnect_rconnect_handler, ac);
-
- *acp = ac;
}
void