2005-12-30 jrandom

* Close streams more gracefully
This commit is contained in:
jrandom
2005-12-30 23:33:52 +00:00
committed by zzz
parent 8e87ae08fb
commit 0f8611e465
12 changed files with 52 additions and 25 deletions

View File

@ -26,6 +26,7 @@ import java.util.*;
import org.klomp.snark.bencode.*;
import net.i2p.data.Destination;
import net.i2p.client.streaming.I2PSocket;
import net.i2p.client.streaming.I2PServerSocket;
import net.i2p.util.I2PThread;
@ -287,8 +288,10 @@ public class Snark
I2PServerSocket serversocket = I2PSnarkUtil.instance().getServerSocket();
if (serversocket == null)
fatal("Unable to listen for I2P connections");
else
debug("Listening on I2P destination " + serversocket.getManager().getSession().getMyDestination().toBase64(), NOTICE);
else {
Destination d = serversocket.getManager().getSession().getMyDestination();
debug("Listening on I2P destination " + d.toBase64() + " / " + d.calculateHash().toBase64(), NOTICE);
}
// Figure out what the torrent argument represents.
meta = null;