Skip to content

Commit

Permalink
Fixes Juniper#88, where the netconf server would drop the first rpc c…
Browse files Browse the repository at this point in the history
…all while handling client hello.
  • Loading branch information
kpostrup committed Mar 24, 2020
1 parent c9408d4 commit 39e35d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions netconf/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 39e35d0

Please sign in to comment.