I suppose the port was not closed since if a port is closed (not listening) there is no connections and TCP is supposed to reply with a RST
package, i.e. "Connection refused" error. Instead, your port was filtered, i.e. your browser never got a reply from anyone if there is someone listening or not on this port.
Filtered connections do not reply at all and silently drop any incoming packet. The filtering could be from a dedicated firewall device, router rules, or host-based firewall software.
Just found this topic through google. To solve the https timeout issue you should not block https requests in your pi firewall, but reject them. Like so:
sudo ufw allow http
sudo ufw reject https