File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed
src/main/java/com/shinemo/mpush/alloc Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ upgrade)
231231restart)
232232 shift
233233 " $0 " stop ${@ }
234- sleep 5
234+ sleep 1
235235 " $0 " start ${@ }
236236 ;;
237237status)
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ public void start() {
6262 }
6363
6464 public void stop () {
65- ZKClient .I .stop ();
65+ if ( ZKClient . I . isRunning ()) ZKClient .I .stop ();
6666 scheduledExecutor .shutdown ();
6767 }
6868
Original file line number Diff line number Diff line change @@ -69,9 +69,9 @@ protected void doStart(Listener listener) throws Throwable {
6969
7070 @ Override
7171 protected void doStop (Listener listener ) throws Throwable {
72- httpServer .stop (60 );//1 min
73- allocHandler .stop ();
72+ httpServer .stop (0 );//1 min
7473 pushHandler .stop ();
74+ allocHandler .stop ();
7575 Logs .Console .info ("===================================================================" );
7676 Logs .Console .info ("====================ALLOC SERVER STOPPED SUCCESS=====================" );
7777 Logs .Console .info ("===================================================================" );
Original file line number Diff line number Diff line change 3131public final class Main {
3232
3333 public static void main (String [] args ) {
34+ Logs .init ();
35+ Logs .Console .info ("launch alloc server..." );
3436 AllocServer server = new AllocServer ();
3537 server .start ();
3638 addHook (server );
You can’t perform that action at this time.
0 commit comments