Net cli update on new icmp

This commit is contained in:
Djeeberjr 2022-12-19 22:57:41 +01:00
parent 0b965d32b6
commit 8180599c04

View File

@ -80,14 +80,9 @@ class Net extends CLIBase {
kernel.net.Net.instance.ping(toID).handle(result -> { kernel.net.Net.instance.ping(toID).handle(result -> {
switch (result){ switch (result){
case Success(acc): case Success(_):
if (acc) {
handle.writeLn("Ping succeeded"); handle.writeLn("Ping succeeded");
trigger(true); trigger(true);
} else {
handle.writeLn("Ping failed");
trigger(false);
}
case Failure(failure): case Failure(failure):
handle.writeLn("Ping failed: " + failure); handle.writeLn("Ping failed: " + failure);
trigger(false); trigger(false);