File tree Expand file tree Collapse file tree 3 files changed +1
-33
lines changed
projects/client/RabbitMQ.Client/src/client/impl Expand file tree Collapse file tree 3 files changed +1
-33
lines changed Original file line number Diff line number Diff line change @@ -962,7 +962,7 @@ private enum RecoveryConnectionState
962
962
private RecoveryConnectionState _recoveryLoopState = RecoveryConnectionState . Connected ;
963
963
964
964
private readonly ConcurrentQueue < RecoveryCommand > _recoveryLoopCommandQueue = new ConcurrentQueue < RecoveryCommand > ( ) ;
965
- readonly SemaphoreSlim _semaphore = new SemaphoreSlim ( 0 ) ;
965
+ private readonly SemaphoreSlim _semaphore = new SemaphoreSlim ( 0 ) ;
966
966
private readonly CancellationTokenSource _recoveryCancellationToken = new CancellationTokenSource ( ) ;
967
967
private readonly TaskCompletionSource < int > _recoveryLoopComplete = new TaskCompletionSource < int > ( ) ;
968
968
Original file line number Diff line number Diff line change @@ -180,8 +180,6 @@ public bool IsOpen
180
180
get { return CloseReason == null ; }
181
181
}
182
182
183
-
184
-
185
183
public ulong NextPublishSeqNo { get => _nextPublishSeqNo ; }
186
184
187
185
public ISession Session { get ; private set ; }
Original file line number Diff line number Diff line change @@ -253,36 +253,6 @@ public void WriteFrameSet(IList<OutboundFrame> frames)
253
253
{
254
254
_writer . Flush ( ) ;
255
255
}
256
- /*
257
- int bufferSize = 0;
258
- for (int i = 0; i < frames.Count; i++)
259
- {
260
- bufferSize += frames[i].GetMinimumBufferSize();
261
- }
262
-
263
- using (IMemoryOwner<byte> memory = MemoryPool<byte>.Shared.Rent(bufferSize))
264
- {
265
- int frameBytes = 0;
266
- Memory<byte> slice = memory.Memory.Slice(0, bufferSize);
267
- for (int i = 0; i < frames.Count; i++)
268
- {
269
- OutboundFrame frame = frames[i];
270
- int frameLength = frame.GetMinimumBufferSize();
271
- Memory<byte> frameSlice = slice.Slice(frameBytes, frameLength);
272
- frame.WriteTo(frameSlice);
273
- frameBytes += frame.ByteCount;
274
- }
275
-
276
- _socket.Client.Poll(_writeableStateTimeoutMicroSeconds, SelectMode.SelectWrite);
277
- if (MemoryMarshal.TryGetArray(slice.Slice(0, frameBytes), out ArraySegment<byte> segment))
278
- {
279
- Write(segment);
280
- return;
281
- }
282
-
283
- throw new InvalidOperationException("Unable to get array segment from memory.");
284
- }
285
- */
286
256
}
287
257
288
258
private void Write ( ArraySegment < byte > bufferSegment , bool flush )
You can’t perform that action at this time.
0 commit comments