for(;;)
{
+ VFS_SelectNode(Node, VFS_SELECT_READ, NULL, "UDP_Channel_Read");
SHORTLOCK(&chan->lQueue);
if(chan->Queue == NULL) {
SHORTREL(&chan->lQueue);
}
pack = chan->Queue;
chan->Queue = pack->Next;
- if(!chan->Queue) chan->QueueEnd = NULL;
+ if(!chan->Queue) {
+ chan->QueueEnd = NULL;
+ VFS_MarkAvaliable(Node, 0); // Nothing left
+ }
SHORTREL(&chan->lQueue);
break;
}