@@ -58,6 +58,7 @@ abstract class ModelBase : IFullModel, IRecoverable
58
58
///<summary>Only used to kick-start a connection open
59
59
///sequence. See <see cref="Connection.Open"/> </summary>
60
60
public BlockingCell < ConnectionStartDetails > m_connectionStartCell = null ;
61
+ internal readonly IBasicProperties _emptyBasicProperties ;
61
62
62
63
private readonly Dictionary < string , IBasicConsumer > _consumers = new Dictionary < string , IBasicConsumer > ( ) ;
63
64
@@ -72,7 +73,6 @@ abstract class ModelBase : IFullModel, IRecoverable
72
73
private readonly object _confirmLock = new object ( ) ;
73
74
private readonly LinkedList < ulong > _pendingDeliveryTags = new LinkedList < ulong > ( ) ;
74
75
private readonly CountdownEvent _deliveryTagsCountdown = new CountdownEvent ( 0 ) ;
75
-
76
76
private EventHandler < ShutdownEventArgs > _modelShutdown ;
77
77
78
78
private bool _onlyAcksReceived = true ;
@@ -93,6 +93,7 @@ public ModelBase(ISession session, ConsumerWorkService workService)
93
93
ConsumerDispatcher = new ConcurrentConsumerDispatcher ( this , workService ) ;
94
94
}
95
95
96
+ _emptyBasicProperties = CreateBasicProperties ( ) ;
96
97
Initialise ( session ) ;
97
98
}
98
99
@@ -1111,7 +1112,7 @@ public void BasicPublish(string exchange,
1111
1112
1112
1113
if ( basicProperties == null )
1113
1114
{
1114
- basicProperties = CreateBasicProperties ( ) ;
1115
+ basicProperties = _emptyBasicProperties ;
1115
1116
}
1116
1117
1117
1118
if ( NextPublishSeqNo > 0 )
0 commit comments