File tree Expand file tree Collapse file tree 1 file changed +9
-17
lines changed
android/app/src/main/java/org/lyrion/squeezelite Expand file tree Collapse file tree 1 file changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -135,22 +135,6 @@ public synchronized void stopPlayer(Context context) {
135135 context .getApplicationContext ().getContentResolver ().unregisterContentObserver (observer );
136136 observer = null ;
137137 }
138- if (null != jsonRpc ) {
139- jsonRpc .sendMessage (new String []{"client" , "forget" }, response -> {
140- Utils .debug ("Handle 'forget' resp" );
141- doStop ();
142- });
143- } else {
144- doStop ();
145- }
146- }
147-
148- private void doStop () {
149- Utils .debug ("" );
150- if (null ==thread ) {
151- return ;
152- }
153- jsonRpc = null ;
154138 stop ();
155139 try {
156140 // Allow C code a little while to stop...
@@ -164,7 +148,15 @@ private void doStop() {
164148 Utils .error ("Exception interrupting player thread" , e );
165149 }
166150 thread = null ;
167- System .exit (0 );
151+ if (null != jsonRpc ) {
152+ jsonRpc .sendMessage (new String []{"client" , "forget" }, response -> {
153+ Utils .debug ("Handle 'forget' resp" );
154+ System .exit (0 );
155+ });
156+ jsonRpc = null ;
157+ } else {
158+ System .exit (0 );
159+ }
168160 }
169161
170162 private synchronized void volumeChanged () {
You can’t perform that action at this time.
0 commit comments