moved initial hello request from client to backend to immediate before first actual query

This commit is contained in:
Olof hagsand 2019-10-27 10:24:13 +01:00
parent 84c94b2c0e
commit 948e203a61
5 changed files with 36 additions and 11 deletions

View file

@ -562,11 +562,16 @@ main(int argc,
clicon_session_id_set(h, getpid());
#endif
/* send hello request from backend hello */
/* Send hello request to backend to get session-id back
* This is done once at the beginning of the session and then this is
* used by the client, even though new TCP sessions are created for
* each message sent to the backend.
*/
if (clicon_hello_req(h, &id) < 0)
goto done;
clicon_session_id_set(h, id);
/* Send hello to northbound client */
if (!quiet)
send_hello(h, 1, id);
if (event_reg_fd(0, netconf_input_cb, h, "netconf socket") < 0)