When changing the socks proxy ip and you do not restart but only redeploy, then the underlying lib uses the old agent settings.
This is because of pooling is used inside request: see request.js 487
--> find out how to force request to create a new agent
Explanation:
Inside node-telegram-bot-api a request is ised that makes use of a pool with the key 'https:SocksProxyAgent'
After redeploy this cached instance is reused.
When changing the socks proxy ip and you do not restart but only redeploy, then the underlying lib uses the old agent settings. This is because of pooling is used inside request: see request.js 487 --> find out how to force request to create a new agent
Explanation: Inside node-telegram-bot-api a request is ised that makes use of a pool with the key 'https:SocksProxyAgent' After redeploy this cached instance is reused.