Skip to content

Commit af1e441

Browse files
authored
Fix crash/hang during shutdown after the attachment was unsuccessfully ping'ed (#8674)
1 parent 176b656 commit af1e441

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/yvalve/why.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5582,6 +5582,13 @@ isc_db_handle& YAttachment::getHandle()
55825582

55835583
YAttachment::~YAttachment()
55845584
{
5585+
if (handle)
5586+
{
5587+
// Currently it may be possible after ping() disconnected from the next
5588+
fb_assert(!next);
5589+
removeHandle(&attachments, handle);
5590+
}
5591+
55855592
if (provider)
55865593
PluginManagerInterfacePtr()->releasePlugin(provider);
55875594
}
@@ -6035,10 +6042,8 @@ void YAttachment::ping(CheckStatusWrapper* status)
60356042
if (!savedStatus.getError())
60366043
savedStatus.save(status);
60376044

6038-
StatusVector temp(NULL);
6039-
CheckStatusWrapper tempCheckStatusWrapper(&temp);
6040-
entry.next()->detach(&tempCheckStatusWrapper);
6041-
next = NULL;
6045+
entry.next()->release();
6046+
next = nullptr;
60426047

60436048
status_exception::raise(savedStatus.value());
60446049
}

0 commit comments

Comments
 (0)