I found using most of the web server sample code on the net, that there seems to be an issue with client.stop() not actually sending the disconnect to the client. Chrome is particularly mean about waiting and or timing out. It occurs randomly. It can be easily seen in the chrome inspector under network and waterfall information. Most pages are distributed in 150 to 250ms, but occasionally, the stop doesn’t happen and it waits 2 to 15 seconds to more to complete the download.
Using other ESP 32 chips with same code, other than I used the heltec include and the heltec.begin(true, false, true) in place of Serial.begin(115200) and pin 25 for led, all worked just fine for 100s of iterations.
Rui Santos has a good example at https://randomnerdtutorials.com/esp32-web-server-arduino-ide/