You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/02/03 21:17:54 UTC
[trafficserver] branch master updated: Fix for YTSATS-983
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 10c008b Fix for YTSATS-983
10c008b is described below
commit 10c008baa48a5cff5bc36ab4cf60c6de6232fc2c
Author: Pushkar Pradhan <pp...@yahoo-inc.com>
AuthorDate: Thu Dec 15 17:30:46 2016 -0800
Fix for YTSATS-983
---
lib/perl/lib/Apache/TS/AdminClient.pm | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/perl/lib/Apache/TS/AdminClient.pm b/lib/perl/lib/Apache/TS/AdminClient.pm
index 653e7a4..9c40af7 100644
--- a/lib/perl/lib/Apache/TS/AdminClient.pm
+++ b/lib/perl/lib/Apache/TS/AdminClient.pm
@@ -184,6 +184,16 @@ sub _do_read {
while ($self->{_select}->can_read($timeout)) {
my $rc = $self->{_socket}->sysread($res, 1024, length($res));
+
+ # If the server dies we get into a infinite loop because
+ # IO::Select::can_read keeps returning true
+ # In this condition sysread returns 0 or undef
+ # Also, we want to return an undef rather than a partial response
+ # to avoid unmarshalling errors in the callers
+ if (!defined($rc) || ($rc == 0)) {
+ $res = undef;
+ last;
+ }
}
return $res || undef;
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].