Skip to content

Commit

Permalink
0.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Immueggpain authored and Immueggpain committed Dec 28, 2019
1 parent 39b0c38 commit 31e5de2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.github.immueggpain</groupId>
<artifactId>simple-streaming</artifactId>
<version>0.0.3</version>
<version>0.0.4</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
version = Launcher.VERSTR, subcommands = { HelpCommand.class, StreamServer.class, Serve.class })
public class Launcher implements Callable<Void> {

public static final String VERSTR = "0.0.3";
public static final String VERSTR = "0.0.4";
public static final int LOCAL_PORT = 2233;
public static final int LOCAL_OVPN_PORT = 1194;

Expand Down
10 changes: 8 additions & 2 deletions src/main/java/com/github/immueggpain/simplestreaming/Serve.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,15 @@ private void send_thread(Socket socket) {
long length = file.length();
file.seek(length);

long ct = copyLarge(file, os, buf);
try {
while (true) {
copyLarge(file, os, buf);
}
} catch (Exception e) {
e.printStackTrace();
}

System.out.println("close socket " + ct);
System.out.println("close socket");
file.close();
socket.close();
} catch (Exception e) {
Expand Down

0 comments on commit 31e5de2

Please sign in to comment.