mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-22 10:15:52 +01:00
Interrupt other stream when one closes
This commit is contained in:
parent
114f4f2209
commit
e254d37a30
@ -138,7 +138,7 @@ public class InternalSubLogger extends SubLogger {
|
||||
out = null;
|
||||
}
|
||||
|
||||
destroy();
|
||||
stop();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user