Skip to content

fix negotiation hang#1071

Merged
Byron merged 1 commit intomainfrom
fix-v1-negotiation
Oct 20, 2023
Merged

fix negotiation hang#1071
Byron merged 1 commit intomainfrom
fix-v1-negotiation

Conversation

@Byron
Copy link
Member

@Byron Byron commented Oct 20, 2023

Fixes #1061


The logic previously tried to estimate when a pack can be expected,
and when a NAK is the end of a block, or the beginning of a pack.

This can be known because a pack (with our settings) needs two things:

  • the server thinks it's ready
  • a done sent by the client

If the server doesn't think it's ready it will send NAK and be done.

So the logic should be, for a NAK to stop the read-loop, that the client
expects a pack, and the server is ready. If the client is not ready, or
the server isn't ready, keep NAK and consider them the end of a round,
hence break the loop.

@Byron Byron force-pushed the fix-v1-negotiation branch 2 times, most recently from 0cf0821 to af64b80 Compare October 20, 2023 15:09
The logic previously tried to estimate when a pack can be expected,
and when a NAK is the end of a block, or the beginning of a pack.

This can be known because a pack (with our settings) needs two things:

* the server thinks it's ready
* a `done` sent by the client

If the server doesn't think it's ready it will send NAK and be done.

So the logic should be, for a NAK to stop the read-loop, that the client
expects a pack, and the server is ready. If the client is not ready, or
the server isn't ready, keep NAK and consider them the end of a round,
hence break the loop.
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

Successfully merging this pull request may close these issues.

*Sometimes* gix fetch gets stuck in negotiation with ssh:// remotes (hosted by gitea)

1 participant