Remove unnecessary and invalid MySQL wait loop