mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-22 21:53:43 +00:00
I2CP: Wait for queue space on internal queue close()
reported by: bottomlineit.co.za
This commit is contained in:
1 file changed
+5
-2
@@ -53,9 +53,12 @@ public abstract class I2CPMessageQueue implements Closeable {
|
||||
public abstract I2CPMessage take() throws InterruptedException;
|
||||
|
||||
/**
|
||||
* == offer(new PoisonI2CPMessage());
|
||||
* == put(new PoisonI2CPMessage());
|
||||
* Blocking if queue is full
|
||||
*/
|
||||
public void close() {
|
||||
offer(new PoisonI2CPMessage());
|
||||
try {
|
||||
put(new PoisonI2CPMessage());
|
||||
} catch (InterruptedException ie) {}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user