Closed eric-armbruster closed 3 years ago
Thanks for the PR, but I'm not sure this is actually needed. The connection used in the retrlines
method is created on-the-fly by the ntransfercmd
method and isn't used after the transfer is made. So it should be closed. Did you experience an actual error?
Anyway, the PR #7 branch changes the code at the same place anyway and doesn't use a context manager on the connection anymore, but also closes the connection explicitly. The PR is still WIP, because it needs more testing. If you coulld try it out and report back I'd be grateful.
One year ago, I had to fix it because it was blocking on ESP32 micropython.
Looking now, I found a similar code with fix too.
Sorry currently, I no longer work on this, but I keep test for the next time.
Closing the file object returned by makefile() WILL close the original socket as well. docs micropython v1.12 https://docs.micropython.org/en/latest/library/usocket.html