client CMD_DESTROY_CHANNEL

This commit is contained in:
Michael Davidsaver
2020-02-26 08:38:15 -08:00
parent 9fefa95df1
commit 3405e3c5ac
2 changed files with 12 additions and 1 deletions
+11
View File
@@ -52,6 +52,17 @@ Channel::~Channel()
context->chanByCID.erase(cid);
context->chanByName.erase(name);
// searchBuckets cleaned in tickSearch()
if(state==Creating || state==Active) {
{
(void)evbuffer_drain(conn->txBody.get(), evbuffer_get_length(conn->txBody.get()));
EvOutBuf R(hostBE, conn->txBody.get());
to_wire(R, sid);
to_wire(R, cid);
}
conn->enqueueTxBody(CMD_DESTROY_CHANNEL);
}
}
void Channel::createOperations()