Working model for triggering reconnects on outgoing connections.

This commit is contained in:
Ian Gulliver
2016-02-17 22:14:04 -08:00
parent ff1a77f22b
commit 4398deb2d4
2 changed files with 18 additions and 4 deletions

View File

@@ -67,7 +67,6 @@ static void receive_read(struct peer *peer) {
if (buf_fill(&receive->buf, receive->peer.fd) <= 0) {
fprintf(stderr, "R %s: Connection closed by peer\n", receive->id);
close(receive->peer.fd);
// TODO: reconnect
return;
}
@@ -79,7 +78,6 @@ static void receive_read(struct peer *peer) {
if (receive->buf.length == BUF_LEN_MAX) {
fprintf(stderr, "R %s: Input buffer overrun. This probably means that adsbus doesn't understand the protocol that this source is speaking.\n", receive->id);
close(receive->peer.fd);
// TODO: reconnect
return;
}
}