Archived
fix(windows): use file path for Unix domain socket on Windows
Windows 10 1803+ supports Unix domain sockets but requires a regular file path, not the named pipe format (\\.\pipe\...). Changed the Windows IPC socket default from named pipe to file path in %TEMP%. This fixes "Network is down: bind" error when starting the service on Windows. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ccabf9d4c1
commit
27648a03a8
1 file changed
+3
-1
@@ -28,11 +28,13 @@ public final class ConfigDefaults {
|
|||||||
/**
|
/**
|
||||||
* Gets the default IPC socket path.
|
* Gets the default IPC socket path.
|
||||||
*
|
*
|
||||||
|
* <p>Windows 10 version 1803+ supports Unix domain sockets with file paths.
|
||||||
|
*
|
||||||
* @return the default IPC socket path
|
* @return the default IPC socket path
|
||||||
*/
|
*/
|
||||||
public static Path getDefaultIpcSocket() {
|
public static Path getDefaultIpcSocket() {
|
||||||
return switch (OperatingSystem.current()) {
|
return switch (OperatingSystem.current()) {
|
||||||
case WINDOWS -> Path.of("\\\\.\\pipe\\barn");
|
case WINDOWS -> Path.of(System.getenv("TEMP"), "barn", "barn.sock");
|
||||||
case LINUX, MACOS -> Path.of("/tmp/barn/barn.sock");
|
case LINUX, MACOS -> Path.of("/tmp/barn/barn.sock");
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user