Notify others about going offline

This commit is contained in:
Juhani Krekelä 2019-07-10 16:24:27 +03:00
parent e7024d853b
commit 98f52fba51
1 changed files with 4 additions and 0 deletions

View File

@ -895,6 +895,10 @@ int main(int argc, char **argv) {
// Start the event loop
eventloop();
// Set our status to going offline and broadcast that
own_status = EMS_OFFLINE;
send_status(broadcast_mac);
// Close the socket (tho I'm not 100% sure it's needed)
if (close(packet_socket) == -1) {
err(1, "close");