Skip to content

Handle dial AlreadyConnected error via retries or state modification #225

Open
@lexnv

Description

Because of the async nature of our code, it is entirely possible that:

  • we try to dial a peer that is already connected
  • the dialing happens before a ConnectionEstablished event is received

At the moment, this is affecting the request-response and notification protocols.
Instead of returning an immediate error, try to cache the request or state of negotiation and submit it when the connection is reported via events.

Code examples:

DialOptions::Dial => match self.service.dial(&peer) {

match self.service.dial(&peer) {

Discovered during: #222

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions