Test always fails with tcp server example

Open
#400 1 comment 0 reactions 1 assignee View on GitHub

@peterharperuk is already working on this.

Since Jun 15, 2023.

Assessment

This issue has not been assessed yet.

Description

Running the TCP server example on my Pico W always fails silently on the server when testing with the provided Python client test script.


Tracked the first issue to this if statement that catches if an empty buffer has been received.
It seems to always occur at the end of the test run:
https://github.com/raspberrypi/pico-examples/blob/eca13acf57916a0bd5961028314006983894fc84/pico_w/wifi/tcp_server/picow_tcp_server.c#L117


Tracked the second issue to tcp_client_err where the err is not err_abort but err_reset every time the Python client is done with the test run. The Python script should close gracefully with sock.close() but this does not seem to be the case for me.
https://github.com/raspberrypi/pico-examples/blob/eca13acf57916a0bd5961028314006983894fc84/pico_w/wifi/tcp_server/picow_tcp_server.c#L163


I would expect the test to successfully run at all times and explain why it fails if it fails in all cases.

Dominant language
C
Stars
3.9k
Forks
1k
Avg merge
1d 16h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/pico-examples

All issues in raspberrypi/pico-examples

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.