smartdevicelink / sdl_core

SmartDeviceLink In-Vehicle Software and Sample HMI
BSD 3-Clause "New" or "Revised" License
240 stars 245 forks source link

Fix/WSS re-connection loop #3891

Closed ShobhitAd closed 2 years ago

ShobhitAd commented 2 years ago

Fixes #3889

This PR is ready for review.

Risk

This PR makes no API changes.

Testing Plan

Test WSS connection use Test Suite appJava

  1. Start appJava with SSL enabled and an invalid certificate/key pair.
  2. Add cloud app entry to sdl_preloaded_pt.json with valid certificate
  3. Start Core and HMI
  4. Activate app
    • Activation fails and HMI receives UpdateAppList with cloudConnectionStatus "NOT_CONNECTED"
  5. Restart appJava with valid certifcate/key pair
  6. Activate app
    • Activation is sucessful. App goes into HMI_FULL.

Summary

Re-connection loop occurs in the case of a succesful tcp layer connection and failed ssl handshake. This is probably due to ShutDown() being called during a re-activation attempt.

CLA