Open derandiunddasbo opened 8 years ago
I have exactly the same problem. I cannot call more than 3 actions no mater which service I use. The 4. action call always gives the same unauthenticated error as seen above me. Currently I´m instantiating a new device instance each time I call a action but this seems to end up in memory issues which does not seem to be the right way. Hope someone can fix this issue. I´ve already looked into the code but I cannot really understand where the issue is.
Here is a (not so) small example using the tr064 lib, torturing a FritzBox 7490 device with obviously to many simultaneous SOAP requests, when trying to retrieve info of all three wifi services (2.4 GHz, 5 GHz and Guest WiFi):
And this is the result:
In this case three requests got through (WLANConfiguration:1#GetInfo, WLANConfiguration:2#GetInfo and WLANConfiguration:2#GetStatistics) while the other three failed with an 'Auth. failed' error.
When running this multiple times, three or more of the six requests randomly fail while the others deliver their results.
I had similar issues in other programming languages and it became apparent, that the FritzBox isn't able to handle more than three (SSL ?) connections to it's TR-064 interface simultaneously.
But is there a good way to handle this issue? Does anyone use this library to fire multiple SOAP requests to a FritzBox device in a nodejs script? And if so: How do you prevent the script from sending too many requests simultaneously and risking connection errors?