if (ref $coderef) {
my @args = $app_msg->params;
- $coderef->session( $session );
my $appreq = OpenSRF::AppRequest->new( $session );
$appreq->max_chunk_size( $coderef->max_chunk_size );
$appreq->max_chunk_count( $coderef->max_chunk_count );
$meth = $self->method_lookup($method,$proto,1);
}
- $meth->session($self->session) if $meth; # Pass the caller's session
return $meth;
}
if ( !UNIVERSAL::isa($req, 'OpenSRF::AppRequest') ) {
$log->debug("Creating a SubRequest object", DEBUG);
unshift @params, $req;
- $req = OpenSRF::AppSubrequest->new( session => $self->session );
+ $req = OpenSRF::AppSubrequest->new;
+ $req->session( $self->session ) if ($self->session);
+
} else {
$log->debug("This is a top level request", DEBUG);
}