Fix empty queue handling when connection is full