Fix Bug 262230

Fix Bug "[CLI] disconecting ios device when open-device-log-stream is active causes CLI to become unresponsive"
http://teampulse.telerik.com/view#item/262230

**recv** returns zero if the connection has as been gracefully closed
http://msdn.microsoft.com/en-us/library/windows/desktop/ms740121(v=vs.85).aspx