mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-23 00:02:59 +00:00
oh, you mean we should actually stop waiting for something on a thread that has nothing left to do? what a concept!
(this should kill the leaking thread issue)
This commit is contained in:
1 parent
fd85416088
commit
3a1fcf2865
1 file changed
+6
-2
@@ -399,7 +399,11 @@ class TCPConnection implements I2NPMessageReader.I2NPMessageEventListener {
|
||||
_transport.connectionClosed(this);
|
||||
}
|
||||
|
||||
List getPendingMessages() { return _toBeSent; }
|
||||
List getPendingMessages() {
|
||||
synchronized (_toBeSent) {
|
||||
return new ArrayList(_toBeSent);
|
||||
}
|
||||
}
|
||||
|
||||
public void disconnected(I2NPMessageReader reader) {
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
@@ -460,7 +464,7 @@ class TCPConnection implements I2NPMessageReader.I2NPMessageEventListener {
|
||||
|
||||
private OutNetMessage getNext() {
|
||||
OutNetMessage msg = null;
|
||||
while (msg == null) {
|
||||
while ( (msg == null) && (_running) ) {
|
||||
synchronized (_toBeSent) {
|
||||
if (_toBeSent.size() <= 0) {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user