Check that full() in udf_buffer is not empty and assert (#1753)
This commit is contained in:
parent
0355c19e68
commit
a0369e38d5
1 changed files with 2 additions and 1 deletions
|
@ -3853,12 +3853,13 @@ nano::udp_data * nano::udp_buffer::allocate ()
|
|||
result = free.front ();
|
||||
free.pop_front ();
|
||||
}
|
||||
if (result == nullptr)
|
||||
if (result == nullptr && !full.empty ())
|
||||
{
|
||||
result = full.front ();
|
||||
full.pop_front ();
|
||||
stats.inc (nano::stat::type::udp, nano::stat::detail::overflow, nano::stat::dir::in);
|
||||
}
|
||||
release_assert (result || stopped);
|
||||
return result;
|
||||
}
|
||||
void nano::udp_buffer::enqueue (nano::udp_data * data_a)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue