Skip to content

Commit c8cc691

Browse files
committed
Cosmetic fixes, remove commented out code
1 parent 4e62101 commit c8cc691

File tree

3 files changed

+1
-33
lines changed

3 files changed

+1
-33
lines changed

projects/client/RabbitMQ.Client/src/client/impl/AutorecoveringConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ private enum RecoveryConnectionState
962962
private RecoveryConnectionState _recoveryLoopState = RecoveryConnectionState.Connected;
963963

964964
private readonly ConcurrentQueue<RecoveryCommand> _recoveryLoopCommandQueue = new ConcurrentQueue<RecoveryCommand>();
965-
readonly SemaphoreSlim _semaphore = new SemaphoreSlim(0);
965+
private readonly SemaphoreSlim _semaphore = new SemaphoreSlim(0);
966966
private readonly CancellationTokenSource _recoveryCancellationToken = new CancellationTokenSource();
967967
private readonly TaskCompletionSource<int> _recoveryLoopComplete = new TaskCompletionSource<int>();
968968

projects/client/RabbitMQ.Client/src/client/impl/ModelBase.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,6 @@ public bool IsOpen
180180
get { return CloseReason == null; }
181181
}
182182

183-
184-
185183
public ulong NextPublishSeqNo { get => _nextPublishSeqNo; }
186184

187185
public ISession Session { get; private set; }

projects/client/RabbitMQ.Client/src/client/impl/SocketFrameHandler.cs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -253,36 +253,6 @@ public void WriteFrameSet(IList<OutboundFrame> frames)
253253
{
254254
_writer.Flush();
255255
}
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-
*/
286256
}
287257

288258
private void Write(ArraySegment<byte> bufferSegment, bool flush)

0 commit comments

Comments
 (0)