File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
convex-cli/src/main/java/convex/cli/peer Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,6 @@ public void run() {
127
127
if (controller ==null ) {
128
128
paranoia ("--address for peer controller not specified" );
129
129
log .debug ("Controller address not specified." );
130
-
131
130
}
132
131
133
132
RESTServer restServer =null ;;
@@ -137,9 +136,10 @@ public void run() {
137
136
config .put (Keywords .STORE , store );
138
137
Server server =API .launchPeer (config );
139
138
140
- restServer =RESTServer .create (server );
141
- restServer .start (apiport );
142
-
139
+ if (!norest ) {
140
+ restServer =RESTServer .create (server );
141
+ restServer .start (apiport );
142
+ }
143
143
144
144
while (server .isRunning ()&&!Thread .currentThread ().isInterrupted ()) {
145
145
Thread .sleep (400 );
@@ -149,6 +149,7 @@ public void run() {
149
149
throw new CLIError (ExitCodes .CONFIG ,"Error in peer configuration: " +t .getMessage (),t );
150
150
} catch (InterruptedException e ) {
151
151
informWarning ("Peer interrupted before normal shutdown" );
152
+ Thread .currentThread ().interrupt ();
152
153
return ;
153
154
} finally {
154
155
if (restServer !=null ) restServer .stop ();
You can’t perform that action at this time.
0 commit comments