Browse Source

Fail silently if Discord socket cannot be opened on Windows.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
3403d289a7
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/discord.cpp

+ 2
- 1
src/discord.cpp View File

@@ -111,7 +111,8 @@ static void run() {
const char* path = "\\\\?\\pipe\\discord-ipc-0"; const char* path = "\\\\?\\pipe\\discord-ipc-0";
int fd = open(path, O_RDWR | O_APPEND); int fd = open(path, O_RDWR | O_APPEND);
if (fd < 0) { if (fd < 0) {
WARN("Could not open Discord socket");
// Fail silently since this just means Discord isn't open.
// WARN("Could not open Discord socket");
return; return;
} }
DEFER({close(fd);}); DEFER({close(fd);});


Loading…
Cancel
Save