mirror of https://github.com/zlatinb/muwire
fix showing Failed status if there are no collections
parent
4a03ce5fff
commit
a28a7e66a1
|
@ -55,6 +55,10 @@ class CollectionsClient {
|
|||
|
||||
InputStream is = endpoint.getInputStream()
|
||||
String code = DataUtil.readTillRN(is)
|
||||
if (code.startsWith("404")) {
|
||||
eventBus.publish(new CollectionFetchStatusEvent(status : CollectionFetchStatus.FINISHED, uuid : e.uuid))
|
||||
return
|
||||
}
|
||||
if (!code.startsWith("200"))
|
||||
throw new Exception("invalid code $code")
|
||||
|
||||
|
|
|
@ -681,6 +681,9 @@ class ConnectionAcceptor {
|
|||
dos?.flush()
|
||||
dos?.close()
|
||||
} catch (Exception ignore) {}
|
||||
try {
|
||||
e.getOutputStream().close()
|
||||
} catch(Exception ignore) {}
|
||||
e.close()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue