Subject: | [Doc Patch] Scalar timeout also applies to disconnect |
According to the docs for timeouts:
As a shortcut, the timeout attribute can also be a scalar. In this case, only the connect and connected operations use this value.
However, the value is also applied to disconnect:
sub _check_timeout ($) {
my($self) = @_;
my($timeout);
$timeout = $self->{"timeout"};
if (defined($timeout)) {
if (ref($timeout) eq "") {
# scalar timeout specified -> backward compatibility
$timeout = {
"connect" => $timeout,
"connected" => $timeout,
"disconnect" => $timeout,
"send" => undef,
"receive" => undef,
};
The attached patch updates the documentation to match the code.
Subject: | scalar_timeout_also_applies_to_disconnect.patch |
--- lib/Net/STOMP/Client.pm 2018-03-02 15:20:50.000000000 -0600
+++ lib/Net/STOMP/Client.pm.new 2018-03-02 15:20:44.000000000 -0600
@@ -1118,7 +1118,7 @@
succeeds.
As a shortcut, the C<timeout> attribute can also be a scalar. In this case,
-only the C<connect> and C<connected> operations use this value.
+only the C<connect>, C<connected>, and C<disconnect> operations use this value.
=head1 STOMP METHODS