Azure / Azure/azure-relay-java

Mistakes in exception handling HybridConnectionListener

Offen
#71 2 Kommentare 0 Reaktionen 2 zugewiesene Personen Beansprucht von @kalkeea Auf GitHub ansehen
Relay
Vorherrschende Sprache
Java
Sterne
8
Forks
15
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

We noticed a race condition occurring after a network disruption, the HybridConnectionListener continues to loop and does not properly detect the error and commence a fresh reconnection cycle.

The reason seems to be in the wrong runtime exceptions being caught in HybridConnectionListener.java.

I also removed all unnecessary throws and replaced catch(Throwable) by more specific exception after having run the code agains our sonar setup.

I advised our Microsoft representative to run your code against a standard code checking tool such as Sonar to take this kind of mistakes out the code! See attached my version of HybridConnectionListener.java - which we updated after your dev commit of Feb 7 (== 0.3 release version).
[HybridConnectionListener.java.txt](https://github.com/Azure/azure-relay-java/files/4646532/HybridConnectionListener.java.txt)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.