Skip to content

polling torn not detected #758

Description

@4t4nner

How to reproduce:

my bot initializing:

const Agent = require('socks5-https-client/lib/Agent')
const TelegramBot = require('node-telegram-bot-api')

bot = new TelegramBot(config.tg.token, {
	polling: true,
	request: {
		agentClass: Agent,
		agentOptions: config.connection.proxy, // it works normal
	},
});
detect bug
let lastUpdate = bot._polling._lastUpdate
setInterval(() => {
	if (lastUpdate === bot._polling._lastUpdate) {
                // watch bot don't detects web torn
		console.error(`polling stopped, last update: ${lastUpdate}`)
		process.exit(1)
	}
	lastUpdate = bot._polling._lastUpdate
}, 25000)

  • wait for telegramPolling._getUpdates executed, but _polling: ._getUpdates() .then (telegramPolling:103) don't
  • torn web connection
  • watch bot don't detects it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions