[svn:dbi] r14598 - dbi/trunk/lib/DBD/Gofer/Transport

[email protected] Tue, 21 Dec 2010 14:53:26 -0800 (PST)
Newsgroups perl.dbi.changes
Message-ID <[email protected]>
Author: timbo
Date: Tue Dec 21 14:53:25 2010
New Revision: 14598

Modified:
   dbi/trunk/lib/DBD/Gofer/Transport/stream.pm

Log:
Minor tweak to DBD::Gofer::Transport::stream error handling

Modified: dbi/trunk/lib/DBD/Gofer/Transport/stream.pm
==============================================================================
--- dbi/trunk/lib/DBD/Gofer/Transport/stream.pm	(original)
+++ dbi/trunk/lib/DBD/Gofer/Transport/stream.pm	Tue Dec 21 14:53:25 2010
@@ -129,13 +129,14 @@
     local $\;
     $wfh->print($encoded_request) # autoflush enabled
         or do {
-            # XXX should make new connection and retry
+            my $err = $!;
+            # XXX could/should make new connection and retry
             $self->_connection_kill;
-            die "Error sending request: $!";
+            die "Error sending request: $err";
         };
     $self->trace_msg("Request sent: $encoded_request\n",0) if $trace >= 4;
 
-    return;
+    return undef; # indicate no response yet (so caller calls receive_response_by_transport)
 }