We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e19e65c commit 9a3838fCopy full SHA for 9a3838f
1 file changed
app/src/main/java/net/sharksystem/asap/android/lora/LoRaBTInputOutputStream.java
@@ -268,17 +268,19 @@ public int available() throws IOException {
268
*/
269
@Override
270
public void close() {
271
- this.inputStreams.clear();
272
this.shouldClose = true;
273
274
// Check if someone is currently reading.
275
// If so, notify, else just assume we are closed
276
- if (this.isReading)
+ if (this.isReading) {
277
synchronized (this.threadLock) {
+ this.inputStreams.clear();
278
this.threadLock.notify();
279
}
280
- else
+ } else {
281
282
this.wasClosed = true;
283
+ }
284
285
286
/**
0 commit comments