Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

socket is blocking after some time or with multiple requests on W5100S pico #103

Closed
IakovlevAA opened this issue Mar 7, 2023 · 3 comments

Comments

@IakovlevAA
Copy link

I've created this Issue, when trying to create HTTP server on Wiznet5k Pico W5100S. Unfortunately, I could solve this only particularly, because socket isn't working stable. It was blocking, if not receivinig bytes after some not fixed time, or receiving multiple requests at once. I've managed to solve double request(it was HTTP lib problem) and time blocking, but 3 or more requests blocking socket immediately.

@BiffoBear
Copy link
Contributor

Hi, Please could you post your code and the error trace from the serial out? I'll have a look at it and see if there is a fix.

@IakovlevAA
Copy link
Author

IakovlevAA commented Apr 7, 2023

hi, i am using this adafruit/Adafruit_CircuitPython_HTTPServer#41 (comment), traceback is the same. Code stucks in "write" method, because there are multiple calls to "listen" or "accept", then it stucks in
adafruit_wiznet5k.py

# if buffer is available, start the transfer
        free_size = self._get_tx_free_size(socket_num)
        while free_size < ret:
            free_size = self._get_tx_free_size(socket_num)
            status = self.socket_status(socket_num)[0]
            if status not in (SNSR_SOCK_ESTABLISHED, SNSR_SOCK_CLOSE_WAIT) or (
                timeout and time.monotonic() - stamp > timeout
            ):
                ret = 0
                break

because it can't get free size of socket_num. Unfortunately, I can't reproduce as I don't have a board

@IakovlevAA
Copy link
Author

IakovlevAA commented Apr 17, 2023

The topic has no connection with the actual version of socket lib. Closing as it was HTTP lib problem

@IakovlevAA IakovlevAA closed this as not planned Won't fix, can't repro, duplicate, stale Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants