Get everyone out of flow's business.

This commit is contained in:
Ian Gulliver
2016-03-02 22:25:56 -08:00
parent e62b84e4e8
commit 2f6db632b2
7 changed files with 35 additions and 33 deletions

View File

@@ -94,13 +94,12 @@ static void file_open(struct file *file) {
file->retry = file_should_retry(fd, file);
file->peer.event_handler = file_handle_close;
if (!flow_hello(fd, file->flow, file->passthrough)) {
file->attempt = 0;
if (!flow_new_send_hello(fd, file->flow, file->passthrough, (struct peer *) file)) {
fprintf(stderr, "F %s: Error writing greeting\n", file->id);
file_retry(file);
return;
}
file->attempt = 0;
file->flow->new(fd, file->passthrough, (struct peer *) file);
}
static void file_open_wrapper(struct peer *peer) {