OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) OpenSprinkler stops working Reply To: OpenSprinkler stops working




Ok, I found I could duplicate the problem by opening http://ospi:8080/jc?pw=xxxxxx in Chrome and then repeatedly clicking the reload button (xxxxxx is the MD5 hashed password). Usually within 10 to 20 seconds I would get the crash based on the unhandled SIGPIPE. This exception occurs when the remote computer closes it’s connection before the write. The code change below will allow the write to no longer generate the signal. See for more.

size_t EthernetClient::write(const uint8_t *buf, size_t size)
// Replace the write below:
//return ::write ( m_sock, buf, size );
// With this instead:
return ::send ( m_sock, buf, size, MSG_NOSIGNAL );