Skip to content
This repository was archived by the owner on Apr 24, 2020. It is now read-only.
This repository was archived by the owner on Apr 24, 2020. It is now read-only.

Messages implicitly converted to string #542

@platy

Description

@platy

Background
I have just spent a lot of time debugging an issue of an array containing a single buffer being sent to ZMQ - in my test cases it worked but with production data there were extra bytes appearing all over the place.

Problem
The OutBuffer silently converts things which are not buffers into strings - link
The String conversion for arrays converts each element to string and concatenates them, the String conversion for Buffer treats the buffer as containing a UTF-8 encoded string.
So for most cases you don't notice a problem like this - ~60% of bytes are valid and survive.

Proposal
I don't think doing this conversion is worth the trouble it can cause - I think we should throw a TypeError - I will send a PR.

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