Closed nherriot closed 4 years ago
Hello @nherriot and thank you for your issue 👍 I've just committed a fix in the write socket function (commit https://github.com/jczic/MicroWebSrv/commit/6f36702cc615152d8951aec7b8d089fbc0c44203). Could you retry your code and tell me if the problem occurs again please :) ? Thanks!
Some news @nherriot ?
Hi MicrowWebSrv people,
this bug seems to be with the pyboard 'D' but I thought I'd report here in case anyone else is seeing large files that seem to timeout on the microWebSrv. Basically I noticed that sometimes my microWebSrv did not fully transfer large image files while testing.
I tested directly with curl scripts shown below:
You can see where the last curl request fails. The output from the microWebSrv on the Pyboard 'D' looks like:
Again we can see the last file never gets sent, and there is no except being called in the WriteResponseFile method. The code looks like:
The file I try and transfer is here - which is not even that large!
I've taken the liberty of adding a lot of print statements and doc strings to the microWebSrv.py file to help me debug. I'll push the doc strings back here today.
If anyone wants to try this out you can find instruction here
I've also reported this to the micropython team here
Things to note that: 1) I have threading set to True, but it only ever uses a single thread so i have no idea why this would be an issue. 2) I do use an IRQ Timer which happens every 10 seconds and calls a callback to check WiFi status.
If anyone has clever ways to debug on the embedded board please let me know. :-) If anyone has an idea why this is happening, or has seen this behaviour before please let me know! :-)
Kind regards, Nicholas.