Skip to content

An error occurred downloading. #16

@LIXUANYI

Description

@LIXUANYI

Hi,I have a demo.

code :
Metafile metafile = new Metafile(new BufferedInputStream(new FileInputStream("c:/saber.torrent")));
TorrentDisk tdisk = new PlainFileSystemTorrentDisk(metafile, new File("c:/"));
tdisk.init();
IncomingPeerListener peerListener = new IncomingPeerListener(59999);
peerListener.start();
Torrent torrent = new Torrent(metafile, tdisk, peerListener);
torrent.startDownload();
while (!torrent.isCompleted()) {
try {
Thread.sleep(1000);
//System.out.println("downloading....");
} catch(InterruptedException ie) {
break;
}
torrent.tick();
}

error message:
java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.DataInputStream.readFully(DataInputStream.java:195)
at java.io.DataInputStream.readFully(DataInputStream.java:169)
at org.bitlet.wetorrent.peer.task.MessageReceiver.execute(MessageReceiver.java:106)
at org.bitlet.wetorrent.util.thread.InterruptableTasksThread.run(InterruptableTasksThread.java:50)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions