Skip Menu |
 

This queue is for tickets about the Net-Stomp CPAN distribution.

Report information
The Basics
Id: 117582
Status: open
Priority: 0/
Queue: Net-Stomp

People
Owner: Nobody in particular
Requestors: nltbo [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.57
Fixed in: (no value)



Subject: send_frame return value
Download (untitled) / with headers
text/plain 233b
There is an issue with the send_frame method. I looks like it always returns an undef. Wouldn't it be better to return the $written value. That holds the number of bytes written to the socket or a undef if failed. Kind regards Theo
Download (untitled) / with headers
text/plain 642b
Hello! Thank you for your request. I had thought of doing that for ages, but then I reworked the automatic re-connection logic, and decided that the change wasn't actually needed or useful. https://github.com/dakkar/net-stomp/commit/2fa634de42ae305b7188b97a87907b83a0c66d93 this change is the minimal needed code (ignoring the important case when multiple writes are needed to send a frame). Keeping in mind that ->send_frame will try quite hard to write the entire frame (using multiple calls to syswrite, or reconnecting if the socket goes away), what is the actual use case for returning what is, essentially, length($frame->as_string)?


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.