diff --git a/src/context.c b/src/context.c index 6095c223..96ff3ed8 100644 --- a/src/context.c +++ b/src/context.c @@ -34,6 +34,7 @@ struct mosquitto *context__init(struct mosquitto_db *db, mosq_sock_t sock) context = mosquitto__calloc(1, sizeof(struct mosquitto)); if(!context) return NULL; + context->pollfd_index = -1; context->state = mosq_cs_new; context->sock = sock; context->last_msg_in = mosquitto_time();