forked from I2P_Developers/i2p.i2p
I2CP: Run DistributeLocal jobs inline (ticket #1506)
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2015-04-16 zzz
|
||||
* I2CP: Run DistributeLocal jobs inline (ticket #1506)
|
||||
* i2psnark: Increase max tunnels to 10
|
||||
* Transport: Fix active peer count for NTCP
|
||||
|
||||
2015-04-15 tuna
|
||||
* SimpleScheduler: Deprecated, functionaltiy moved to SimpleTimer2 (ticket #1069)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 2;
|
||||
public final static long BUILD = 3;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
||||
@@ -476,6 +476,8 @@ class ClientConnectionRunner {
|
||||
/**
|
||||
* Asynchronously deliver the message to the current runner
|
||||
*
|
||||
* Note that no failure indication is available.
|
||||
* Fails silently on e.g. queue overflow to client, client dead, etc.
|
||||
*/
|
||||
void receiveMessage(Destination toDest, Destination fromDest, Payload payload) {
|
||||
if (_dead) return;
|
||||
|
||||
@@ -299,8 +299,10 @@ class ClientManager {
|
||||
// sender went away
|
||||
return;
|
||||
}
|
||||
// TODO can we just run this inline instead?
|
||||
_ctx.jobQueue().addJob(new DistributeLocal(toDest, runner, sender, fromDest, payload, msgId, messageNonce));
|
||||
// run this inline so we don't clog up the job queue
|
||||
Job j = new DistributeLocal(toDest, runner, sender, fromDest, payload, msgId, messageNonce);
|
||||
//_ctx.jobQueue().addJob(j);
|
||||
j.runJob();
|
||||
} else {
|
||||
// remote. w00t
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
@@ -346,6 +348,8 @@ class ClientManager {
|
||||
|
||||
public void runJob() {
|
||||
_to.receiveMessage(_toDest, _fromDest, _payload);
|
||||
// note that receiveMessage() does not indicate a failure,
|
||||
// so a queue overflow is not recognized. we always return success.
|
||||
if (_from != null) {
|
||||
_from.updateMessageDeliveryStatus(_msgId, _messageNonce, MessageStatusMessage.STATUS_SEND_SUCCESS_LOCAL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user