Interrupt other stream when one closes

This commit is contained in:
ME1312 2018-11-02 19:48:46 -04:00
parent 114f4f2209
commit e254d37a30
No known key found for this signature in database
GPG Key ID: FEFFE2F698E88FA8
3 changed files with 4 additions and 3 deletions

View File

@ -138,7 +138,7 @@ public class InternalSubLogger extends SubLogger {
out = null;
}
destroy();
stop();
}
}

View File

@ -132,6 +132,7 @@ public final class ExHost {
try {
info = PluginInfo.getPluginInfo(this);
info.setLogger(log);
if (ExHost.class.getPackage().getSpecificationTitle() != null) info.setSignature(new Version(ExHost.class.getPackage().getSpecificationTitle()));
info.setIcon(ExHost.class.getResourceAsStream("/net/ME1312/SubServers/Host/Library/Files/icon.png"));
engine = GalaxiEngine.init(info);
log.info.println("Loading SubServers.Host v" + info.getVersion().toString() + " Libraries");

View File

@ -71,6 +71,7 @@ public class SubLogger {
@SuppressWarnings("deprecation")
private void start(InputStream in, boolean isErr) {
try {
YAMLSection yaml = SubAPI.getInstance().getInternals().config.get().getSection("Settings");
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String line;
while ((line = br.readLine()) != null) {
@ -105,7 +106,6 @@ public class SubLogger {
}
// Log to NETWORK
YAMLSection yaml = SubAPI.getInstance().getInternals().config.get().getSection("Settings");
if (log.get() && yaml.getBoolean("Network-Log", true)) SubAPI.getInstance().getSubDataNetwork().sendPacket(new PacketOutExLogMessage(address, line));
// Log to CONSOLE
@ -125,7 +125,7 @@ public class SubLogger {
out = null;
}
destroy();
stop();
}
}