Print socket errors when sending WoL packets

This commit is contained in:
Cameron Gutman
2019-01-01 19:20:09 -08:00
parent 2b14856d7f
commit d35c5bcaba

View File

@@ -193,11 +193,17 @@ bool NvComputer::wake()
// Send to all ports
for (quint16 port : WOL_PORTS) {
if (sock.writeDatagram(wolPayload, address, port)) {
qInfo().nospace().noquote() << "Send WoL packet to " << name << " via " << address.toString() << ":" << port;
qInfo().nospace().noquote() << "Sent WoL packet to " << name << " via " << address.toString() << ":" << port;
success = true;
}
else {
qWarning() << "Send failed:" << sock.error();
}
}
}
else {
qWarning() << "Bind failed:" << sock.error();
}
}
}