Homey running out of connections with node-fetch?

I have just finished my work on the following app:

However, after a while, Homey seems to be unable to communicate with the REST interface of this device. This interface is still reachable from any other device in my network, so the problem lies with Homey.
Also, rebooting homey solves the issue temporarily.

Could it be that homey is somehow running out of connections? I am using node-fetch, to connect to the AC from Homey.

Are you getting any errors, or are the connections timing out?

Hey Robert,

I am not able to reproduce it anymore. I think I took out the bug, whatever it was by tidying up some promise resolving.