Added EINTR handle on connect and disconnect