Skip to content

Incomplete responses lead to failure-loop #59

Open
@Joacchim

Description

@Joacchim

With the fix for #54 , a new bug was introduced:
When the reponse cannot be read in its entirety (whatever the reason, but the bug was shown thanks to an error in the DELETE op of the playground server), the sock_send_receive function tries to re-send the request, which was partially overwritten while reading the response.

This means that either:

  • We must "receive" in a different temporary buffer
  • We must not retry to transmit the request

Also:

  • The retry must be limited to a given number of times (otherwise the fail loop won't ever be stopped)
  • The status returned when the fail-loop is interrupted or when a partial response was received should reflect the fact that the response isn't complete (returning a negative status ? Which errno code? another method ?)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions