mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 20:29:52 +01:00
Don't call the callback after stop() has been called.
This commit is contained in:
@@ -106,7 +106,7 @@ abstract class FilePlugin implements BatchTransportPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void createReaderFromFile(final File f) {
|
protected void createReaderFromFile(final File f) {
|
||||||
if(!started) throw new IllegalStateException();
|
if(!started) return;
|
||||||
executor.execute(new ReaderCreator(f));
|
executor.execute(new ReaderCreator(f));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,8 +127,12 @@ abstract class FilePlugin implements BatchTransportPlugin {
|
|||||||
if(f.length() < TransportConstants.MIN_CONNECTION_LENGTH) return;
|
if(f.length() < TransportConstants.MIN_CONNECTION_LENGTH) return;
|
||||||
try {
|
try {
|
||||||
FileInputStream in = new FileInputStream(f);
|
FileInputStream in = new FileInputStream(f);
|
||||||
callback.readerCreated(new FileTransportReader(f, in,
|
synchronized(FilePlugin.this) {
|
||||||
FilePlugin.this));
|
if(started) {
|
||||||
|
callback.readerCreated(new FileTransportReader(f, in,
|
||||||
|
FilePlugin.this));
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user