netopeer2
netopeer2 copied to clipboard
Edit-config success on server side , client side returned NC_MSG_WOULD_BLOCK
Hello, I did a edit config using edit-config function in commands.c , the return value is -1, that is caused by NC_MSG_WOULD_BLCK from nc_send_rpc(). The send rpc timeout is only 1 second, so it could happen I guess., because I got failure in 1s. If it is failed in nc_recv_rpc() , it must take more than 5s. I checked more into it, nc_send_rpc calls nc_msg_send_io(), which in turn calls nc_write_msg_io() which calls nc_session_io_lock , that gives NC_MSG_WOULDBLOCK return value.
However, On the server side sysrepo, the configuration got deleted. I don't understand how could it happen. if nc_write_msg_io returns NC_MSG_WOULDBLOCK, how the rpc is sent to the server and server processed it and did the operations.
I got this issue many times, edit-config failing but the operation became successs on server side. How is it getting success, if the rpc not went to server?
Thank you.