Skip to content

Commit

Permalink
make better
Browse files Browse the repository at this point in the history
  • Loading branch information
reshke committed Feb 21, 2024
1 parent 58892b6 commit 5984d92
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions sources/frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,9 @@ od_frontend_remote_process_server(od_server_t *server, od_client_t *client,
od_router_t *router = client->global->router;
od_router_detach(router, client);
server = NULL;
} else if (status != OD_OK) {
} else if (status == OD_WAIT_SYNC) {
return OD_OK;
} if (status != OD_OK) {
return status;
}
return OD_OK;
Expand Down Expand Up @@ -1761,10 +1763,7 @@ static od_frontend_status_t od_frontend_remote(od_client_t *client)
/* retry read operation after attach */
continue;
} else if (status == OD_WAIT_SYNC) {
// while (machine_cond_wait_no_change(server->relay.src->on_read, 60000) != 0) {
// machine_sleep(1);
// // wtf?
// }
// ok
} else if (status != OD_OK) {
break;
}
Expand All @@ -1777,9 +1776,9 @@ static od_frontend_status_t od_frontend_remote(od_client_t *client)
status = od_frontend_remote_process_server(
server, client, 1);
// OD_ATTACH should not happen.
// OD_DETACH only when od_server_synchronized is true
if (status != OD_OK && status != OD_WAIT_SYNC &&
status != OD_DETACH) {
// OD_DETACH & OD_WAIT_SYNC handled inside
// od_frontend_remote_process_server
if (status != OD_OK) {
break;
}
}
Expand Down

0 comments on commit 5984d92

Please sign in to comment.