From 39e35d08b5e1c87525724375c17ac25d6ece23f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kenneth=20=C3=98strup?= Date: Tue, 24 Mar 2020 17:47:30 +0100 Subject: [PATCH] Fixes #88, where the netconf server would drop the first rpc call while handling client hello. --- netconf/session.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netconf/session.go b/netconf/session.go index e2d71c1..3f7890e 100644 --- a/netconf/session.go +++ b/netconf/session.go @@ -69,14 +69,14 @@ func NewSession(t Transport) *Session { s := new(Session) s.Transport = t + // Send our hello using default capabilities. + t.SendHello(&HelloMessage{Capabilities: DefaultCapabilities}) + // Receive Servers Hello message serverHello, _ := t.ReceiveHello() s.SessionID = serverHello.SessionID s.ServerCapabilities = serverHello.Capabilities - // Send our hello using default capabilities. - t.SendHello(&HelloMessage{Capabilities: DefaultCapabilities}) - // Set Transport version t.SetVersion("v1.0") for _, capability := range s.ServerCapabilities {