Skip to content

Commit

Permalink
* Making HandleChannleClose async
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebakken committed Feb 19, 2024
1 parent c8ce6d8 commit 48ee0d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions projects/RabbitMQ.Client/client/framing/Channel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ public override Task ConnectionTuneOkAsync(ushort channelMax, uint frameMax, ush
return ModelSendAsync(method, cancellationToken).AsTask();
}

public override void _Private_ChannelCloseOk()
public override Task _Private_ChannelCloseOkAsync(CancellationToken cancellationToken)
{
ChannelSend(new ChannelCloseOk());
var method = new ChannelCloseOk();
return ModelSendAsync(method, cancellationToken).AsTask();
}

public override void _Private_ChannelFlowOk(bool active)
Expand Down
6 changes: 3 additions & 3 deletions projects/RabbitMQ.Client/client/impl/ChannelBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,8 @@ protected void HandleChannelClose(in IncomingCommand cmd)

Session.Close(CloseReason, false);

_Private_ChannelCloseOk();
// TODO async
_Private_ChannelCloseOkAsync(CancellationToken.None).EnsureCompleted();
}
finally
{
Expand Down Expand Up @@ -952,8 +953,7 @@ protected bool HandleQueueDeclareOk(in IncomingCommand cmd)
}
}

// TODO async
public abstract void _Private_ChannelCloseOk();
public abstract Task _Private_ChannelCloseOkAsync(CancellationToken cancellationToken);

// TODO async
public abstract void _Private_ChannelFlowOk(bool active);
Expand Down

0 comments on commit 48ee0d0

Please sign in to comment.