Skip Menu |
 

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

Report information
The Basics
Id: 103071
Status: resolved
Priority: 0/
Queue: Net-Stomp

People
Owner: Nobody in particular
Requestors: colddaylike [...] ya.ru
Cc:
AdminCc:

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



Subject: receive_frame with timeout
Date: Tue, 24 Mar 2015 21:09:46 +0300
To: bug-net-stomp [...] rt.cpan.org
From: colddaylike <colddaylike [...] ya.ru>
Download (untitled) / with headers
text/plain 467b
Hi, I was reading the code and maybe found a bug. When receive_frame is called with the timeout parameter, if it started reading the frame body, and _read_data returns undef because of timeout, the receive_frame function returns undef too. When receive_frame is called next time it should continue reading the body, but I believe it starts reading headers again, though _framebuf contains not the headers but the body data. I'm sorry if I misunderstood something.
Download (untitled) / with headers
text/plain 375b
You are most probably right. The reason nobody noticed before is that, on a read timeout, we usually reconnect, so all the buffers and the connection state are reset. But yes, the library should keep better track of what state it's in, and resume where it left off. I'll write some tests to trigger the bug, and release a new version with a fix. Thank you for the report!
Download (untitled) / with headers
text/plain 169b
Fixed and released 0.54. https://github.com/dakkar/net-stomp/commit/61e7312a7ae4fdc08c28bf1a26c8b1dbb46b389e We need more eagle-eyed reviewers like you! Thanks again.
Subject: Re: [rt.cpan.org #103071] receive_frame with timeout
Date: Wed, 25 Mar 2015 20:44:21 +0300
To: "bug-Net-Stomp [...] rt.cpan.org" <bug-net-stomp [...] rt.cpan.org>
From: colddaylike <colddaylike [...] ya.ru>
Thanks a lot for the fix!


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.