From 8172e9e17a7ad242e7ddd5bf3db9ac039c76a577 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 7 Aug 2009 17:04:43 +0000 Subject: [PATCH] -Fix CPU hogging by DB management process git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3967 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Table.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 928f1769a..f3e204a62 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -108,7 +108,6 @@ sub init_dbworker { unless ($dbworkersocket) { die $!; } - my $dbconn; my $currcon; my $clientset = new IO::Select; $clientset->add($dbworkersocket); @@ -116,12 +115,12 @@ sub init_dbworker { my @ready_socks = $clientset->can_read; foreach $currcon (@ready_socks) { if ($currcon == $dbworkersocket) { #We have a new connection to register - $dbconn = $currcon->accept; + my $dbconn = $currcon->accept; if ($dbconn) { $clientset->add($dbconn); } } else { - handle_dbc_conn($dbconn,$clientset); + handle_dbc_conn($currcon,$clientset); } }