git://git.nikiroo.be
/
nikiroo-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fcec1f3
)
fix STOP server
author
Niki Roo
<niki@nikiroo.be>
Thu, 14 May 2020 15:27:43 +0000
(17:27 +0200)
committer
Niki Roo
<niki@nikiroo.be>
Thu, 14 May 2020 15:27:43 +0000
(17:27 +0200)
src/be/nikiroo/fanfix/library/WebLibrary.java
patch
|
blob
|
blame
|
history
diff --git
a/src/be/nikiroo/fanfix/library/WebLibrary.java
b/src/be/nikiroo/fanfix/library/WebLibrary.java
index 7566877cebd48343b47c1764ed31045ee8de78dd..0f2510dd544218279d8ddcaa1beae3ad097d631c 100644
(file)
--- a/
src/be/nikiroo/fanfix/library/WebLibrary.java
+++ b/
src/be/nikiroo/fanfix/library/WebLibrary.java
@@
-133,7
+133,17
@@
public class WebLibrary extends BasicLibrary {
* in case of I/O errors
*/
public void stop() throws IOException {
- post(WebLibraryUrls.EXIT_URL, null).close();
+ try {
+ post(WebLibraryUrls.EXIT_URL, null).close();
+ } catch (Exception e) {
+ try {
+ Thread.sleep(200);
+ } catch (InterruptedException e1) {
+ }
+ if (getStatus() != Status.UNAVAILABLE) {
+ throw new IOException("Cannot exit the library", e);
+ }
+ }
}
@Override