mirror of https://github.com/yandex/odyssey.git
Fix incorrect flush_status usage in frontend code. (#328)
This should prevent "unexpected error status OD_DETACH (4)" which caused abnormal server connection termination.
This commit is contained in:
parent
7e8c71b950
commit
41925d4585
|
@ -944,9 +944,8 @@ static od_frontend_status_t od_frontend_remote(od_client_t *client)
|
||||||
if (status == OD_DETACH) {
|
if (status == OD_DETACH) {
|
||||||
/* detach on transaction pooling */
|
/* detach on transaction pooling */
|
||||||
/* write any pending data to server first */
|
/* write any pending data to server first */
|
||||||
od_frontend_status_t flush_status;
|
status = od_relay_flush(&server->relay);
|
||||||
flush_status = od_relay_flush(&server->relay);
|
if (status != OD_OK)
|
||||||
if (flush_status != OD_OK)
|
|
||||||
break;
|
break;
|
||||||
od_relay_detach(&client->relay);
|
od_relay_detach(&client->relay);
|
||||||
od_relay_stop(&server->relay);
|
od_relay_stop(&server->relay);
|
||||||
|
@ -954,7 +953,7 @@ static od_frontend_status_t od_frontend_remote(od_client_t *client)
|
||||||
/* cleanup server */
|
/* cleanup server */
|
||||||
rc = od_reset(server);
|
rc = od_reset(server);
|
||||||
if (rc == -1) {
|
if (rc == -1) {
|
||||||
flush_status = OD_ESERVER_WRITE;
|
status = OD_ESERVER_WRITE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue