[net][lwip] fix assert in the sys_arch_mbox_fetch function when close socket
This commit is contained in:
parent
c2322353aa
commit
a0e62f665f
|
@ -498,14 +498,10 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
|
|||
}
|
||||
|
||||
ret = rt_mb_recv(*mbox, (rt_ubase_t *)msg, t);
|
||||
if(ret == -RT_ETIMEOUT)
|
||||
if(ret != RT_EOK)
|
||||
{
|
||||
return SYS_ARCH_TIMEOUT;
|
||||
}
|
||||
else
|
||||
{
|
||||
LWIP_ASSERT("rt_mb_recv returned with error!", ret == RT_EOK);
|
||||
}
|
||||
|
||||
/* get elapse msecond */
|
||||
tick = rt_tick_get() - tick;
|
||||
|
|
|
@ -509,12 +509,9 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
|
|||
}
|
||||
|
||||
ret = rt_mb_recv(*mbox, (rt_ubase_t *)msg, t);
|
||||
|
||||
if(ret == -RT_ETIMEOUT)
|
||||
return SYS_ARCH_TIMEOUT;
|
||||
else
|
||||
if(ret != RT_EOK)
|
||||
{
|
||||
LWIP_ASSERT("rt_mb_recv returned with error!", ret == RT_EOK);
|
||||
return SYS_ARCH_TIMEOUT;
|
||||
}
|
||||
|
||||
/* get elapse msecond */
|
||||
|
|
|
@ -523,12 +523,9 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
|
|||
}
|
||||
|
||||
ret = rt_mb_recv(*mbox, (rt_ubase_t *)msg, t);
|
||||
|
||||
if(ret == -RT_ETIMEOUT)
|
||||
return SYS_ARCH_TIMEOUT;
|
||||
else
|
||||
if(ret != RT_EOK)
|
||||
{
|
||||
LWIP_ASSERT("rt_mb_recv returned with error!", ret == RT_EOK);
|
||||
return SYS_ARCH_TIMEOUT;
|
||||
}
|
||||
|
||||
/* get elapse msecond */
|
||||
|
|
Loading…
Reference in New Issue