Skip to content

Commit 4b43919

Browse files
committed
no need to enter using if value is null
1 parent ed3b780 commit 4b43919

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

projects/RabbitMQ.Client/client/impl/Session.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ public Session(Connection connection, int channelNumber)
5555

5656
public override void HandleFrame(in InboundFrame frame)
5757
{
58-
using (Command cmd = _assembler.HandleFrame(in frame))
58+
Command cmd = _assembler.HandleFrame(in frame);
59+
if (cmd != null)
5960
{
60-
if (cmd != null)
61+
using (cmd)
6162
{
6263
OnCommandReceived(cmd);
6364
}

0 commit comments

Comments
 (0)