[*] eat da boogs

This commit is contained in:
Reece Wilson 2022-07-05 21:16:22 +01:00
parent 82f87679d2
commit c4df7fc4c2
4 changed files with 11 additions and 1 deletions

View File

@ -186,6 +186,11 @@ void AuRPCClientChannel::Finalize()
{
auto re = AuExchange(this->outstandingRequests, AuList<AuSPtr<AuRPCRequest>>{});
if (AuExchange(this->bIsDead_, true))
{
return;
}
for (auto a : re)
{
a->callback->OnResponse(AuRPCResponse(ERPCError::eAborted));

View File

@ -41,6 +41,7 @@ struct AuRPCClientChannel : AuRPCChannel, AuIRPCClientChannel, AuEnableSharedFro
private:
bool bConnectingAlternate_{};
bool bConnected_{};
bool bIsDead_ {};
AuSPtr<AuIRPCChannelCallbacks> callbacks_;
AuRPCPipe pipe_;
AuSPtr<AuRPC> parent_;

View File

@ -154,6 +154,10 @@ void AuRPCPipe::OnPipePartialEvent(AuUInt trasnferred)
void AuRPCPipe::OnPipeSuccessEvent()
{
if (this->isClient_)
{
return;
}
RpcLogDebug("Waiting for next socket");
this->isOpenWork = GetRPCProcessor()->StartSimpleLSWatch(this->pipe->AsReadChannelIsOpen(),
AuSPtr<AuIO::IIOSimpleEventListener>(this->channel->ToContext(), this));

View File

@ -18,7 +18,7 @@ bool AuRPCRequest::SetData(const AuMemoryViewRead& view)
{
data.Reset();
this->packetLength = view.length + this->HeaderLength();
data.Reserve(view.length + this->HeaderLength());
data.Resize(view.length + this->HeaderLength());
if (!this->data)
{
SysPushErrorMem();