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

Owner: Nobody in particular
Requestors: colddaylike [...]

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 [...]
From: colddaylike <colddaylike [...]>
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. We need more eagle-eyed reviewers like you! Thanks again.
Subject: Re: [ #103071] receive_frame with timeout
Date: Wed, 25 Mar 2015 20:44:21 +0300
To: "bug-Net-Stomp [...]" <bug-net-stomp [...]>
From: colddaylike <colddaylike [...]>
Thanks a lot for the fix!

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

Please report any issues with to