telehash / telehash.github.io

Contents of the site
http://telehash.org/
Other
483 stars 59 forks source link

Exchange state. #115

Closed fd closed 9 years ago

fd commented 9 years ago

I seem to remember that exchanges used to expire after two minutes of inactivity (no open channels over that exchange). But I can't find it in the spec any more.

Did this change?

quartzjer commented 9 years ago

There was language like that in v2 since the transport coupling to udp/nat was so strong, that the exchange timeout was tied to it, but in v3 each transport can provide it's own semantics for when any "pipe" has timed out independent of the exchange state.

When a transport pipe fails it should trigger a handshake, and when that fails the exchange should start timing out channels, but should not close until all of the channels have timed out (as they may provide their own timeouts), so there isn't a fixed/exact time, it just depends on the current channels open and transport timeout events.

With no open channels an exchange and its ephemeral keys should be expunged immediately, or close to immediately, within a few seconds? There may be custom/embedded situations where that is not optimal and can be relaxed, so perhaps it isn't a hard/fixed rule?