The Ethershield_webserver example works fine, but occasionally won't respond to requests. Once I added debug logging to trace the execution this problem vanished; which makes me believe it's a timing bug where something isn't waiting as long as it should before proceeding.
To reproduce:
- start Ethershield_webserver example, ensure it serves requests
- make multiple requests (either manually or with apache ab:
ab -n 10 <ip>
- expected result: all requests get handled fine
- actual result: some requests time out
To "fix":
- add a
Serial.println(...) command after dat_p=es.ES_packetloop_icmp_tcp(buf,plen); in line 172
- re-run the test above
- result: all requests get handled fine