[FIXED] Prevent LeafNode loop detection on early reconnect

If the soliciting side detects the disconnect and attempts to
reconnect but the accepting side did not yet close the connection,
a "loop detected" error would be reported and the soliciting server
would not try to reconnect for 30 seconds.

Made a change so that the accepting server checks for existing
leafnode connection for the same server and same account, and if
it is found, close the "old" connection so it is replaced by
the "new" one.

Resolves #1606

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2020-09-22 16:58:36 -06:00
parent 0752d8b8e7
commit 2605ae71ed
3 changed files with 192 additions and 1 deletions

View File

@@ -1722,7 +1722,7 @@ func TestLeafNodeExportsImports(t *testing.T) {
}
}
func TestLeadNodeExportImportComplexSetup(t *testing.T) {
func TestLeafNodeExportImportComplexSetup(t *testing.T) {
content := `
port: -1
operator = "./configs/nkeys/op.jwt"