[LON-CAPA-cvs] cvs: loncom / LondConnection.pm
foxr
foxr at source.lon-capa.org
Mon Oct 1 07:00:44 EDT 2012
foxr Mon Oct 1 11:00:44 2012 EDT
Modified files:
/loncom LondConnection.pm
Log:
Fix timeout edgecase (But 6610?).
Index: loncom/LondConnection.pm
diff -u loncom/LondConnection.pm:1.52 loncom/LondConnection.pm:1.53
--- loncom/LondConnection.pm:1.52 Mon Jan 24 11:02:32 2011
+++ loncom/LondConnection.pm Mon Oct 1 11:00:43 2012
@@ -1,7 +1,7 @@
# This module defines and implements a class that represents
# a connection to a lond daemon.
#
-# $Id: LondConnection.pm,v 1.52 2011/01/24 11:02:32 foxr Exp $
+# $Id: LondConnection.pm,v 1.53 2012/10/01 11:00:43 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -342,9 +342,12 @@
$self->Transition("Disconnected");
return -1;
}
- # Append the data to the buffer. And figure out if the read is done:
+ # If we actually got data, reset the timeout.
- $self->{TimeoutRemaining} = $self->{TimeoutValue}; # getting data resets the timeout period.
+ if (length $data) {
+ $self->{TimeoutRemaining} = $self->{TimeoutValue}; # getting data resets the timeout period.
+ }
+ # Append the data to the buffer. And figure out if the read is done:
&Debug(9,"Received from host: ".$data);
$self->{TransactionReply} .= $data;
More information about the LON-CAPA-cvs
mailing list