return;
}
+ if(c->node) {
+ c->node->out_meta += outlen;
+ }
+
buffer_read(&c->outbuf, outlen);
if(!c->outbuf.len) {
}
}
+void flush_meta(meshlink_handle_t *mesh, connection_t *c) {
+ handle_meta_write(mesh, c);
+}
+
static void handle_meta_io(event_loop_t *loop, void *data, int flags) {
meshlink_handle_t *mesh = loop->data;
connection_t *c = data;
if(!result) {
finish_connecting(mesh, c);
} else {
- logger(mesh, MESHLINK_DEBUG, "Error while connecting to %s: %s", c->name, sockstrerror(result));
+ logger(mesh, MESHLINK_ERROR, "Error while connecting to %s: %s", c->name, sockstrerror(result));
terminate_connection(mesh, c, false);
return;
}
/* We are waiting for a callback from the ADNS thread */
} else if(outgoing->state == OUTGOING_NO_KNOWN_ADDRESSES) {
logger(mesh, MESHLINK_ERROR, "No known addresses for %s", outgoing->node->name);
+ list_delete(mesh->outgoings, outgoing);
} else {
logger(mesh, MESHLINK_ERROR, "Could not set up a meta connection to %s", outgoing->node->name);
retry_outgoing(mesh, outgoing);
fd = accept(l->tcp.fd, &sa.sa, &len);
if(fd < 0) {
+ if(sockwouldblock(errno)) {
+ return;
+ }
+
if(errno == EINVAL) { // TODO: check if Windows agrees
event_loop_stop(loop);
return;