|
|
@@ -89,9 +89,13 @@ sub run {
|
|
|
}
|
|
|
|
|
|
my $socket = $self->socket();
|
|
|
- print $socket $self->packet(CMD, $command);
|
|
|
-
|
|
|
- return $self->response();
|
|
|
+ if($socket->connected)
|
|
|
+ {
|
|
|
+ print $socket $self->packet(CMD, $command);
|
|
|
+ return $self->response();
|
|
|
+ }
|
|
|
+
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
# create tcp socket
|
|
|
@@ -339,4 +343,4 @@ Chris Jones, E<lt>[email protected]<gt>
|
|
|
it under the same terms as Perl itself, either Perl version 5.8.5 or,
|
|
|
at your option, any later version of Perl 5 you may have available.
|
|
|
|
|
|
-=cut
|
|
|
+=cut
|