Skip to content

Commit 781674c

Browse files
authored
Merge pull request #11 from binarin/fix-in-cleanup-warning
Use predicate to test for session handle presence
2 parents ca54ffe + 2d83a13 commit 781674c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Thrift/API/HiveClient2.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ has _session_handle => (
225225
},
226226
lazy => 1,
227227
builder => '_build_session_handle',
228+
predicate => '_has_session_handle',
228229
);
229230

230231
sub _build_session_handle {
@@ -484,7 +485,7 @@ sub DEMOLISH {
484485

485486
$self->_cleanup_previous_operation;
486487

487-
if ( $self->_session_handle ) {
488+
if ( $self->_has_session_handle ) {
488489
$self->_client->CloseSession(
489490
Thrift::API::HiveClient2::TCloseSessionReq->new(
490491
{ sessionHandle => $self->_session_handle, }

0 commit comments

Comments
 (0)