postwait / node-amqp

[UNMAINTAINED] node-amqp is an AMQP client for nodejs
MIT License
1.7k stars 357 forks source link

Error: read ECONNRESET when define a property to Object #471

Open alexaleluia12 opened 5 years ago

alexaleluia12 commented 5 years ago

Add a property to Object causes a run time error and disconnect client from RabbitMQ

Error from amqp: Error: unsupported type in amqp table: function at Object.serializeValue (/home/alex/Documentos/cod/my/test-node-amqp/node_modules/amqp/lib/serializer.js:181:17) at Object.serializeTable (/home/alex/Documentos/cod/my/test-node-amqp/node_modules/amqp/lib/serializer.js:200:18) at Object.serializeFields (/home/alex/Documentos/cod/my/test-node-amqp/node_modules/amqp/lib/serializer.js:310:22) at Connection._sendMethod (/home/alex/Documentos/cod/my/test-node-amqp/node_modules/amqp/lib/connection.js:858:14) at Connection._onMethod (/home/alex/Documentos/cod/my/test-node-amqp/node_modules/amqp/lib/connection.js:472:12) at AMQPParser.self.parser.onMethod (/home/alex/Documentos/cod/my/test-node-amqp/node_modules/amqp/lib/connection.js:136:12) at AMQPParser._parseMethodFrame (/home/alex/Documentos/cod/my/test-node-amqp/node_modules/amqp/lib/parser.js:377:10) at frameEnd (/home/alex/Documentos/cod/my/test-node-amqp/node_modules/amqp/lib/parser.js:94:16) at frame (/home/alex/Documentos/cod/my/test-node-amqp/node_modules/amqp/lib/parser.js:79:14) at AMQPParser.header [as parse] (/home/alex/Documentos/cod/my/test-node-amqp/node_modules/amqp/lib/parser.js:65:14) Error from amqp: { Error: read ECONNRESET at TCP.onread (net.js:660:25) errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' }

reproduce the error: https://github.com/alexaleluia12/reproduce-error-amqp RabbiMQ: 3.7.7 Node: v10.9.0 amqp: 0.2.7