mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +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) {
|
||||
if(!started) throw new IllegalStateException();
|
||||
if(!started) return;
|
||||
executor.execute(new ReaderCreator(f));
|
||||
}
|
||||
|
||||
@@ -127,8 +127,12 @@ abstract class FilePlugin implements BatchTransportPlugin {
|
||||
if(f.length() < TransportConstants.MIN_CONNECTION_LENGTH) return;
|
||||
try {
|
||||
FileInputStream in = new FileInputStream(f);
|
||||
callback.readerCreated(new FileTransportReader(f, in,
|
||||
FilePlugin.this));
|
||||
synchronized(FilePlugin.this) {
|
||||
if(started) {
|
||||
callback.readerCreated(new FileTransportReader(f, in,
|
||||
FilePlugin.this));
|
||||
}
|
||||
}
|
||||
} catch(IOException e) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user