If the error value is EPIPE, AMD doesn't close the socket connection.
Because, the EPIPE error means "Broken pipe".
The server closes the socket connection.
Change-Id: I94b036084f5387981e8f40972c5cc811b314bdfe
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
auto raw = parcel.GetRaw();
int ret = channel->Send(reinterpret_cast<void*>(&raw[0]), raw.size());
if (ret != 0) {
- _E("Socket will be closed, pid(%d)", channel->GetPid());
+ if (ret == -EPIPE) {
+ _E("Socket was closed. pid(%d)", channel->GetPid());
+ return ret;
+ }
+
+ _E("Socket will be closed. pid(%d)", channel->GetPid());
channel->Close();
return ret;
}