Skip to content

Commit e7c48cc

Browse files
committed
Removed implementation of IRecoverable from AutorecoveringConnection
1 parent 1303490 commit e7c48cc

File tree

2 files changed

+4
-23
lines changed

2 files changed

+4
-23
lines changed

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

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
namespace RabbitMQ.Client.Framing.Impl
5252
{
53-
public class AutorecoveringConnection : IConnection, IRecoverable
53+
public class AutorecoveringConnection : IConnection
5454
{
5555
private readonly object m_eventLock = new object();
5656

@@ -267,25 +267,6 @@ public event EventHandler<QueueNameChangedAfterRecoveryEventArgs> QueueNameChang
267267
}
268268
}
269269

270-
[Obsolete("Use RecoverySucceeded instead")]
271-
public event EventHandler<EventArgs> Recovery
272-
{
273-
add
274-
{
275-
lock (m_eventLock)
276-
{
277-
m_recovery += value;
278-
}
279-
}
280-
remove
281-
{
282-
lock (m_eventLock)
283-
{
284-
m_recovery -= value;
285-
}
286-
}
287-
}
288-
289270
public string ClientProvidedName { get; private set; }
290271

291272
public ushort ChannelMax

projects/client/Unit/src/unit/TestConnectionRecovery.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ public void TestRecoveryEventHandlersOnChannel()
632632
public void TestRecoveryEventHandlersOnConnection()
633633
{
634634
Int32 counter = 0;
635-
((AutorecoveringConnection)Conn).Recovery += (source, ea) => Interlocked.Increment(ref counter);
635+
((AutorecoveringConnection)Conn).RecoverySucceeded += (source, ea) => Interlocked.Increment(ref counter);
636636

637637
CloseAndWaitForRecovery();
638638
CloseAndWaitForRecovery();
@@ -698,7 +698,7 @@ public void TestServerNamedQueueRecovery()
698698

699699
var latch = new ManualResetEvent(false);
700700
var connection = ((AutorecoveringConnection)Conn);
701-
connection.Recovery += (source, ea) => latch.Set();
701+
connection.RecoverySucceeded += (source, ea) => latch.Set();
702702
connection.QueueNameChangeAfterRecovery += (source, ea) => { nameAfter = ea.NameAfter; };
703703

704704
CloseAndWaitForRecovery();
@@ -972,7 +972,7 @@ protected void CloseAndWaitForShutdown(AutorecoveringConnection conn)
972972
protected ManualResetEvent PrepareForRecovery(AutorecoveringConnection conn)
973973
{
974974
var latch = new ManualResetEvent(false);
975-
conn.Recovery += (source, ea) => latch.Set();
975+
conn.RecoverySucceeded += (source, ea) => latch.Set();
976976

977977
return latch;
978978
}

0 commit comments

Comments
 (0)