Skip to content

Cannot read property 'resurrectTimeout' of undefined #1122

@kulakowka

Description

@kulakowka

Greetings!

I found an error in the code:

if ((opts.now || Date.now()) < connection.resurrectTimeout) {

    const connection = this.connections.find(c => c.id === this.dead[0])

    if ((opts.now || Date.now()) < connection.resurrectTimeout) {
      debug('Nothing to resurrect')
      callback(null, null)
      return
    }

If the connection is not found. Then the code will throw an error further: Cannot read property 'resurrectTimeout' of undefined

I just got a lot of such errors in production.

Screen Shot 2020-03-22 at 8 57 21 AM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions