mirror of
https://github.com/matrix-construct/construct
synced 2024-11-02 20:09:16 +01:00
Clean this up a bit.
This commit is contained in:
parent
519bd8540b
commit
9f316874a3
1 changed files with 4 additions and 5 deletions
|
@ -252,17 +252,16 @@ read_packet(rb_fde_t * F, void *data)
|
||||||
*/
|
*/
|
||||||
length = rb_read(client_p->localClient->F, readBuf, READBUF_SIZE);
|
length = rb_read(client_p->localClient->F, readBuf, READBUF_SIZE);
|
||||||
|
|
||||||
if(length <= 0)
|
if(length < 0)
|
||||||
{
|
|
||||||
if(length < 0 && rb_ignore_errno(errno))
|
|
||||||
{
|
{
|
||||||
|
if(rb_ignore_errno(errno))
|
||||||
rb_setselect(client_p->localClient->F,
|
rb_setselect(client_p->localClient->F,
|
||||||
RB_SELECT_READ, read_packet, client_p);
|
RB_SELECT_READ, read_packet, client_p);
|
||||||
} else
|
else
|
||||||
error_exit_client(client_p, length);
|
error_exit_client(client_p, length);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(length == 0)
|
else if(length == 0)
|
||||||
{
|
{
|
||||||
error_exit_client(client_p, length);
|
error_exit_client(client_p, length);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue