windkh / node-red-contrib-telegrambot

Telegram bot nodes for node-red.
Other
264 stars 117 forks source link

socks agent is pooled by request #267

Closed windkh closed 1 year ago

windkh commented 2 years ago

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.