forked from I2P_Developers/i2p.i2p
2005-12-18 jrandom
* Added a standalone runner for the I2PSnark web ui (build with the
command "ant i2psnark", unzip i2psnark-standalone.zip somewhere, run
with "java -jar launch-i2psnark.jar", and go to http://localhost:8002/).
* Further I2PSnark error handling
This commit is contained in:
@@ -62,13 +62,13 @@ class PeerConnectionOut implements Runnable
|
||||
{
|
||||
try
|
||||
{
|
||||
while (!quit)
|
||||
while (!quit && peer.isConnected())
|
||||
{
|
||||
Message m = null;
|
||||
PeerState state = null;
|
||||
synchronized(sendQueue)
|
||||
{
|
||||
while (!quit && sendQueue.isEmpty())
|
||||
while (!quit && peer.isConnected() && sendQueue.isEmpty())
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -86,7 +86,7 @@ class PeerConnectionOut implements Runnable
|
||||
}
|
||||
}
|
||||
state = peer.state;
|
||||
if (!quit && state != null)
|
||||
if (!quit && state != null && peer.isConnected())
|
||||
{
|
||||
// Piece messages are big. So if there are other
|
||||
// (control) messages make sure they are send first.
|
||||
@@ -149,8 +149,9 @@ class PeerConnectionOut implements Runnable
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
Snark.debug(peer + ": " + t, Snark.ERROR);
|
||||
t.printStackTrace();
|
||||
I2PSnarkUtil.instance().debug(peer.toString(), Snark.ERROR, t);
|
||||
if (t instanceof OutOfMemoryError)
|
||||
throw (OutOfMemoryError)t;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user