Your system wasn’t unprotected. When the Avast firewall isn’t working, the windows firewall was.
Until you reboot, the required changes don’t happen and the updated Avast firewall can’t run.
That’s why you received the message that a restart was needed. 
At that point, you needed to be in control and make the decision which was more important. Finish your work, or reboot so the firewall could work.