Skip to content

TLS Reconnection Issue : always non-tls socket created on drachtio-server connection drop #211

@kv-dhyey-moliya

Description

@kv-dhyey-moliya

Issue Description :
When my drachtio-server crashes or restarts by any reason, the drachtio-srf application tries to connect with drachtio-server without the original TLS configuration.

Technical Investigation :

  • WireProtocol.connect(opts) call correctly creates tls or non-tls connection based on the passed opts.
  • But if the connection drops by any reason, then the function _onConnectionGone() always creates a new non-tls connection.
  • It should check if the original connection was done using tls, then the new socket should also be created with tls.

Resolution :

  • Store tls options from opts on WireProtocol.connect() function along with existing port and host.
  • Reuse the tls options to initialize a tls connection or non-tls connection conditionally as done in the original connect() function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions