File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -316,7 +316,7 @@ impl Server {
316
316
self
317
317
}
318
318
319
- pub fn start_listener ( & mut self ) -> Result < ( ) > {
319
+ pub fn start_listen ( & mut self ) -> Result < ( ) > {
320
320
let connections = self . connections . clone ( ) ;
321
321
322
322
if self . listeners . is_empty ( ) {
@@ -502,12 +502,12 @@ impl Server {
502
502
"thread_count_default should biger than thread_count_min" . to_string ( ) ,
503
503
) ) ;
504
504
}
505
- self . start_listener ( ) ?;
505
+ self . start_listen ( ) ?;
506
506
info ! ( "server started" ) ;
507
507
Ok ( ( ) )
508
508
}
509
509
510
- pub fn shutdown_listen ( mut self ) -> Self {
510
+ pub fn stop_listen ( mut self ) -> Self {
511
511
self . listener_quit_flag . store ( true , Ordering :: SeqCst ) ;
512
512
close ( self . monitor_fd . 1 ) . unwrap_or_else ( |e| {
513
513
warn ! (
@@ -523,7 +523,7 @@ impl Server {
523
523
self
524
524
}
525
525
526
- pub fn shutdown_connection ( mut self ) {
526
+ pub fn disconnect ( mut self ) {
527
527
info ! ( "begin to shutdown connection" ) ;
528
528
let connections = self . connections . lock ( ) . unwrap ( ) ;
529
529
@@ -543,7 +543,7 @@ impl Server {
543
543
}
544
544
545
545
pub fn shutdown ( self ) {
546
- self . shutdown_listen ( ) . shutdown_connection ( ) ;
546
+ self . stop_listen ( ) . disconnect ( ) ;
547
547
}
548
548
}
549
549
You can’t perform that action at this time.
0 commit comments