Use relative socket paths instead of absolute paths
Replaced usage of absolute paths with relative socket file names for Unix domain sockets. This change simplifies socket file handling and may improve compatibility across different environments.
This commit is contained in:
parent
edaf215577
commit
1d936e10eb
|
|
@ -198,7 +198,7 @@ Future prepareApp() async {
|
||||||
environmentVariables["FLET_SERVER_PORT"] = tcpPort.toString();
|
environmentVariables["FLET_SERVER_PORT"] = tcpPort.toString();
|
||||||
} else {
|
} else {
|
||||||
// use UDS on other platforms
|
// use UDS on other platforms
|
||||||
pageUrl = path.join(appTempPath, "flet_$pid.sock");
|
pageUrl = "flet_$pid.sock";
|
||||||
environmentVariables["FLET_SERVER_UDS_PATH"] = pageUrl;
|
environmentVariables["FLET_SERVER_UDS_PATH"] = pageUrl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -227,7 +227,7 @@ Future<String?> runPythonApp(List<String> args) async {
|
||||||
'Python output TCP Server is listening on port ${outSocketServer.port}');
|
'Python output TCP Server is listening on port ${outSocketServer.port}');
|
||||||
socketAddr = "$tcpAddr:${outSocketServer.port}";
|
socketAddr = "$tcpAddr:${outSocketServer.port}";
|
||||||
} else {
|
} else {
|
||||||
socketAddr = path.join(environmentVariables["FLET_APP_STORAGE_TEMP"]!, "stdout_$pid.sock");
|
socketAddr = "stdout_$pid.sock";
|
||||||
if (await File(socketAddr).exists()) {
|
if (await File(socketAddr).exists()) {
|
||||||
await File(socketAddr).delete();
|
await File(socketAddr).delete();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue