Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: OpenSprinkler stops working #38279

    Jerry
    Participant

    Thanks for your quick attention to this issue. The updates resolve my issue. I have to say, that was fast! I haven’t even received my new hardware yet and this was fixed. Although I have been running an OpenSprinklerPi for about a year I purchased new hardware with the purpose of developing my own software to run it. I had been running a different package than yours and hadn’t been totally happy. Then I found OpenSprinklerGen2. It addressed all the “shortcomings” that kept me from running the older version. I no longer feel the need to write my own 🙂 Nice work!

    in reply to: OpenSprinkler stops working #38265

    Jerry
    Participant

    Samer,

    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 http://stackoverflow.com/questions/108183/how-to-prevent-sigpipes-or-handle-them-properly 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 );
    }

    in reply to: OpenSprinkler stops working #38264

    Jerry
    Participant

    I’m seeing the exact same thing. The application crashes and has to be restarted. Debugging it I see: Received a SIGPIPE: Broken pipe in EthernetClient::write. I also use HomeSeer and the issue is much worse when the OpenSprinkler plugin is enabled although I also can get the same thing by just using the web interface for OpenSprinkler. Seems like the code may not be handling cases where the other side drops the connection for whatever reason or possibly it has difficulty handling multiple simultaneous requests???

Viewing 3 posts - 1 through 3 (of 3 total)