Skip to content

Refactor key agreement connection choosing

akwizgran requested to merge 283-key-exchange-connections into master

This branch fixes two bugs in the key agreement connection code that can cause connections not to be closed:

  1. If we receive an incoming connection and then cancel the exchange before scanning the other party's QR code, the connection is never closed (we loop in ReadableTask#call() waiting for alice to become true or data to become available).
  2. If an outgoing connection attempt is in progress when closePending() is called, and the attempt subsequently succeeds, the connection is never closed (the Future's value can't be retrieved because it's been cancelled).

Could be backported.

Closes #283 (closed)

Merge request reports