File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 13
13
using System . Linq ;
14
14
using System . Net . Sockets ;
15
15
using System . Runtime . CompilerServices ;
16
- using System . Threading ;
17
16
using Akka . Actor ;
18
17
using Akka . Dispatch ;
19
18
using Akka . Event ;
@@ -155,10 +154,7 @@ private Receive WaitingForRegistration(IActorRef commander)
155
154
// up to this point we've been watching the commander,
156
155
// but since registration is now complete we only need to watch the handler from here on
157
156
if ( ! Equals ( register . Handler , commander ) )
158
- {
159
- Context . Unwatch ( commander ) ;
160
- Context . Watch ( register . Handler ) ;
161
- }
157
+ SignDeathPact ( register . Handler ) ; // will unsign death pact with commander automatically
162
158
163
159
if ( _traceLogging ) Log . Debug ( "[{0}] registered as connection handler" , register . Handler ) ;
164
160
@@ -727,6 +723,7 @@ private void Abort()
727
723
protected void StopWith ( CloseInformation closeInfo )
728
724
{
729
725
_closedMessage = closeInfo ;
726
+ UnsignDeathPact ( ) ;
730
727
Context . Stop ( Self ) ;
731
728
}
732
729
You can’t perform that action at this time.
0 commit comments