EINVAL from setsockopt() on OSX is ignored
EINVAL from setsockopt() on OSX is ignored

This is an OSX bug: If the peer have disconnected, setsockopt()
returns EINVAL. This patch ignores the error and assumes that the
next send/recv operation on the socket will fail and cause the
cleanup to happen.

Signed-off-by: Martin Sustrik <4dd6061be1198639e8b05ce4fd5ead7a0dcaa0f4@250bpm.com>

TTimo/nanomsg,imp/nanomsg,pch957/nanomsg,wirebirdlabs/featherweight-nanomsg,tempbottle/nanomsg,gdamore/mamomsg,snikulov/nanomsg,cosin2008/nanomsg.NET,kaostao/nanomsg,modulexcite/nanomsg,kaostao/nanomsg,hyperfact/nanomsg,nirs/nanomsg,wfxiang08/nanomsg,linearregression/nanomsg,wfxiang08/nanomsg,krafczyk/nanomsg,pakozm/nanomsg,smithed/nanomsg,nirs/nanomsg,gdamore/mamomsg,ttyangf/nanomsg,linearregression/nanomsg,reqshark/nanomsg,potatogim/nanomsg,tempbottle/nanomsg,thisco-de/nanomsg,modulexcite/nanomsg,potatogim/nanomsg,snikulov/nanomsg,smithed/nanomsg,ttyangf/nanomsg,krafczyk/nanomsg,ttyangf/nanomsg,potatogim/nanomsg,krafczyk/nanomsg,smithed/nanomsg,reqshark/nanomsg,cosin2008/nanomsg.NET,reqshark/nanomsg,simplestbest/nanomsg,imp/nanomsg,pch957/nanomsg,zerotacg/nanomsg,modulexcite/nanomsg,yan97ao/nanomsg,wirebirdlabs/featherweight-nanomsg,kaostao/nanomsg,kaostao/nanomsg,TTimo/nanomsg,pakozm/nanomsg,linearregression/nanomsg,wfxiang08/nanomsg,hyperfact/nanomsg,JackDunaway/featherweight-nanomsg,imp/nanomsg,zerotacg/nanomsg,zerotacg/nanomsg,simplestbest/nanomsg,wirebirdlabs/featherweight-nanomsg,TTimo/nanomsg,cosin2008/nanomsg.NET,ttyangf/nanomsg,yan97ao/nanomsg,JackDunaway/featherweight-nanomsg,simplestbest/nanomsg,smithed/nanomsg,TTimo/nanomsg,nirs/nanomsg,yan97ao/nanomsg,gdamore/mamomsg,thisco-de/nanomsg,JackDunaway/featherweight-nanomsg,tempbottle/nanomsg,featherweight/ftw-kernel-nanomsg,hyperfact/nanomsg,pch957/nanomsg,featherweight/ftw-kernel-nanomsg,pakozm/nanomsg