Skip to content

Draft: doc/examples: retry on sending in echo servers

Alexander Sosedkin requested to merge asosedkin/gnutls:examples-retrying into master

I've noticed that the examples don't handle GNUTLS_E_INTERRUPTED/GNUTLS_E_AGAIN the way the gnutls_record_send prescribe, likely an omission in ca86194b. I've sketched up what I'd like to see changed about it for one of the echo servers:

  • LOOP_CHECK on echoing back
  • rename LOOP_CHECK to not give an impression that it asserts non-negative retcodes
  • CHECK separately after using this construct where applicable

but there are many of them, so I'm deferring this work. Will be happy if somebody else picks it up or points out problems with the proposed changes.

Checklist

  • Commits have Signed-off-by: with name/author being identical to the commit author
  • Code modified for feature
  • Test suite updated with functionality tests
  • Test suite updated with negative tests
  • Documentation updated / NEWS entry present (for non-trivial changes)
  • CI timeout is 2h or higher (see Settings/CICD/General pipelines/Timeout)

Reviewer's checklist:

  • Any issues marked for closing are addressed
  • There is a test suite reasonably covering new functionality or modifications
  • Function naming, parameters, return values, types, etc., are consistent and according to CONTRIBUTION.md
  • This feature/change has adequate documentation added
  • No obvious mistakes in the code

Merge request reports