Skip to content

connection.js line 635 infinite loop #1048

@krlicmuhamed

Description

@krlicmuhamed

I was using sequelize to connect to my postgres database. However, not paying attention, I didn't configure the right port and username/password. That made my node.js app loop infinitely on this line. I figured this line out by using node debug .

break in node_modules/pg/lib/connection.js:635
 633 Connection.prototype.parseCString = function(buffer) {
 634   var start = this.offset;
>635   while(buffer[this.offset++] !== 0) { }
 636   return buffer.toString(this.encoding, start, this.offset - 1);
 637 };
debug> o
break in node_modules/pg/lib/connection.js:635
 633 Connection.prototype.parseCString = function(buffer) {
 634   var start = this.offset;
>635   while(buffer[this.offset++] !== 0) { }
 636   return buffer.toString(this.encoding, start, this.offset - 1);
 637 };
debug> o

I don't experience any other issues If I use correct connection data, so this may be a potential bug, just pointing out this discovery.

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