Don't assert, rather print error messages.
Signed-off-by: Jan Vidar Krey <janvidar@extatic.org>
This commit is contained in:
parent
f6af8cf389
commit
5a0f01d1ec
@ -177,8 +177,10 @@ void net_on_write(int fd, short ev, void *arg)
|
||||
user->send_queue_size -= ret;
|
||||
user->send_queue_offset = 0;
|
||||
|
||||
assert(user->send_queue_size >= 0);
|
||||
assert(user->send_queue_offset >= 0);
|
||||
if ((user->send_queue_size < 0) || (user->send_queue_offset < 0))
|
||||
{
|
||||
hub_log(log_error, "INVALID: send_queue_size=%d, send_queue_offset=%d", user->send_queue_size, user->send_queue_offset);
|
||||
}
|
||||
|
||||
list_remove(user->send_queue, msg);
|
||||
|
||||
@ -198,8 +200,10 @@ void net_on_write(int fd, short ev, void *arg)
|
||||
user->send_queue_size -= ret;
|
||||
user->send_queue_offset += ret;
|
||||
|
||||
assert(user->send_queue_size >= 0);
|
||||
assert(user->send_queue_offset >= 0);
|
||||
if ((user->send_queue_size < 0) || (user->send_queue_offset < 0))
|
||||
{
|
||||
hub_log(log_error, "INVALID: send_queue_size=%d, send_queue_offset=%d", user->send_queue_size, user->send_queue_offset);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user