Setting the value of caglobals.ip.shutdownFds[1] to -1 to avoid
double closure of the same socket
https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/706
(cherry-picked from
3dfe9fb3db7945b50a663a7ff545e11b576c1cfe)
Change-Id: Ia46a971ebdc834433f528986b3c772487f06c60c
Signed-off-by: Sourav Bhuwalka <s.bhuwalka@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
if (caglobals.ip.shutdownFds[1] != -1)
{
close(caglobals.ip.shutdownFds[1]);
+ caglobals.ip.shutdownFds[1] = -1;
// receive thread will stop immediately
}
else