when I get/write data via confd socket many times, confd ocurrs “DEBUG Failed to connect to ConfD: Transport endpoint is already connected”.
follow case is my test steps:
There is a process waiting notification from confd.
There is another shell script call “netconf-console --host ip --port prot config.xml” per 2 seconds.
When the process receives notificaton from poll set, it will do “example code”.
After shell script repeates netconf-console command more than 40 times, the process will occur “Transport endpoint is already connected” in cdb_connect function.
confd_sock = socket(PF_INET6, SOCK_STREAM, 0);
confd_load_schemas((struct sockaddr*)&addr, sizeof(struct sockaddr_in6);
cdb_connect(confd_sock, CDB_DATA_SOCKET, (struct sockaddr*)&addr, sizeof(struct sockaddr_in6));
// do something in iterate_changes function
cdb_diff_iterate(subs_sock, sub_points, iterate_changes, (ITER_WANT_PREV | ITER_WANT_SCHEMA_ORDER), (void*)&confd_sock);
what’s problem in my example code?