client fix Channel reconnect

This commit is contained in:
Michael Davidsaver
2020-03-02 09:11:44 -08:00
parent c404c5f425
commit a3ffbd2a9b
3 changed files with 29 additions and 8 deletions
+11
View File
@@ -94,6 +94,17 @@ void Channel::createOperations()
}
}
void Channel::disconnect(const std::shared_ptr<Channel>& self)
{
self->state = Channel::Searching;
self->sid = 0xdeadbeef; // spoil
context->searchBuckets[context->currentBucket].push_back(self);
log_debug_printf(io, "Server %s detach channel '%s' to re-search\n",
conn ? conn->peerName.c_str() : "<disconnected>",
self->name.c_str());
}
OperationBase::OperationBase(operation_t op, const std::shared_ptr<Channel>& chan)
:Operation(op)