File tree 2 files changed +18
-13
lines changed
2 files changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -1173,18 +1173,17 @@ public virtual bool Start()
1173
1173
1174
1174
try
1175
1175
{
1176
- //Will be removed in the next version
1177
- #pragma warning disable 0612 , 618
1178
- OnStartup ( ) ;
1179
- #pragma warning restore 0612 , 618
1176
+ var newSessionHandler = m_NewSessionHandler ;
1177
+ if ( newSessionHandler != null )
1178
+ newSessionHandler . Start ( ) ;
1180
1179
1181
1180
OnStarted ( ) ;
1182
1181
}
1183
1182
catch ( Exception e )
1184
1183
{
1185
1184
if ( Logger . IsErrorEnabled )
1186
1185
{
1187
- Logger . Error ( "One exception wa thrown in the method 'OnStartup ()'." , e ) ;
1186
+ Logger . Error ( "One exception wa thrown in the method 'OnStarted ()'." , e ) ;
1188
1187
}
1189
1188
}
1190
1189
finally
@@ -1199,14 +1198,6 @@ public virtual bool Start()
1199
1198
return true ;
1200
1199
}
1201
1200
1202
- /// <summary>
1203
- /// Called when [startup].
1204
- /// </summary>
1205
- [ Obsolete ( "Use OnStarted() instead" ) ]
1206
- protected virtual void OnStartup ( )
1207
- {
1208
-
1209
- }
1210
1201
1211
1202
/// <summary>
1212
1203
/// Called when [started].
@@ -1244,6 +1235,10 @@ public virtual void Stop()
1244
1235
GC . Collect ( ) ;
1245
1236
GC . WaitForFullGCComplete ( ) ;
1246
1237
1238
+ var newSessionHandler = m_NewSessionHandler ;
1239
+ if ( newSessionHandler != null )
1240
+ newSessionHandler . Stop ( ) ;
1241
+
1247
1242
OnStopped ( ) ;
1248
1243
1249
1244
m_ServerStatus [ StatusInfoKeys . IsRunning ] = false ;
Original file line number Diff line number Diff line change @@ -17,6 +17,16 @@ public interface INewSessionHandler
17
17
/// <param name="sessionRegister">The session register.</param>
18
18
void Initialize ( ISessionRegister sessionRegister ) ;
19
19
20
+ /// <summary>
21
+ /// Starts this instance.
22
+ /// </summary>
23
+ void Start ( ) ;
24
+
25
+ /// <summary>
26
+ /// Stops this instance.
27
+ /// </summary>
28
+ void Stop ( ) ;
29
+
20
30
/// <summary>
21
31
/// Accepts the new session.
22
32
/// </summary>
You can’t perform that action at this time.
0 commit comments