My client updates the remote server with the subroutine below. I'm doubting
that the tables will automatically be unlocked with the connection to the
remote server breaks. Do I need to at least do a $dbh->disconnect anywhere
in the code below??? Is there a better way to reconnect when the remote
connection breaks?
--------------------------- CODE SAMPLE -----------------------
sub eval_update_central_db
{
my $email_info = shift;
my $i = 0;
while (1)
{
$i++;
eval { &update_central_db($email_info); }; ## lock tables here
last unless ($@ and ($i < 10));
warn "\nupdate-central-db() died with [EMAIL PROTECTED] attempt again\n";
sleep $SLEEP_CONNECTION_ERR;
$dbh = $linkopt->connect;
$dbh->{RaiseError} = 1;
}
}
[EMAIL PROTECTED]
Position Research, Inc.
Search engine results by research
tel: (760) 480-8291 fax: (760) 480-8271
www.PositionResearch.com