max-christian / homebridge-texecom

A plugin for homebridge (https://github.com/nfarina/homebridge) to integrate Texecom Premier Elite zones into HomeKit
MIT License
27 stars 8 forks source link

SIGTERM after IP connection closed #16

Closed garethflowers closed 4 years ago

garethflowers commented 4 years ago

When using an IP address that fails to connect an unhandled error is sometimes raised which causes a SIGTERM (and restart) in Homebridge.

[6/30/2020, 12:24:06 AM] [Texecom] IP connection ended
[6/30/2020, 12:24:06 AM] [Texecom] IP connection closed
[6/30/2020, 12:24:06 AM] Error: connect EADDRNOTAVAIL 127.0.0.1 - Local (0.0.0.0:57855)
    at internalConnect (net.js:923:16)
    at defaultTriggerAsyncIdScope (internal/async_hooks.js:313:12)
    at GetAddrInfoReqWrap.emitLookup [as callback] (net.js:1063:9)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:68:8)

Homebridge config.json

...
"platform": "Texecom",
"ip_address": "192.168.1.2",
"ip_port": 10001,
...

The error appears to be due to a network connection retry that is done on localhost.