sub send {
my $self = shift;
- return unless ($self and $self->session);
+ return unless ($self and $self->session and !$self->complete);
$self->session->send(@_);
}
sub resend {
my $self = shift;
- return unless ($self and $self->session);
- return if $self->complete;
+ return unless ($self and $self->session and !$self->complete);
OpenSRF::Utils::Logger->debug(
"I'm resending the request for threadTrace ". $self->threadTrace, DEBUG);
if($self->payload) {
sub status {
my $self = shift;
my $msg = shift;
- return unless ($self and $self->session);
+ return unless ($self and $self->session and !$self->complete);
$self->session->send( 'STATUS',$msg, $self->threadTrace );
}
sub respond {
my $self = shift;
my $msg = shift;
- return unless ($self and $self->session);
+ return unless ($self and $self->session and !$self->complete);
my $response;
if (ref($msg) && UNIVERSAL::can($msg, 'getAttribute') && $msg->getAttribute('name') =~ /oilsResult/) {
sub respond_complete {
my $self = shift;
my $msg = shift;
+ return unless ($self and $self->session and !$self->complete);
my $response;
if (ref($msg) && UNIVERSAL::can($msg, 'getAttribute') && $msg->getAttribute('name') =~ /oilsResult/) {
statusCode => STATUS_COMPLETE(),
status => 'Request Complete' );
- return unless ($self and $self->session);
- $self->session->send( 'RESULT' => $response, 'STATUS' => $stat, $self->threadTrace);
+ $self->session->send( 'RESULT' => $response, 'STATUS' => $stat, $self->threadTrace);
+ $self->complete(1);
}
sub register_death_callback {