Fixed "SocketException: Failed to create server socket stdout.sock"
This commit is contained in:
parent
669f6301f8
commit
12716dec8e
|
|
@ -177,6 +177,9 @@ Future<String?> runPythonApp() async {
|
||||||
socketAddr = "$tcpAddr:${outSocketServer.port}";
|
socketAddr = "$tcpAddr:${outSocketServer.port}";
|
||||||
} else {
|
} else {
|
||||||
socketAddr = "stdout.sock";
|
socketAddr = "stdout.sock";
|
||||||
|
if (await File(socketAddr).exists()) {
|
||||||
|
await File(socketAddr).delete();
|
||||||
|
}
|
||||||
outSocketServer = await ServerSocket.bind(
|
outSocketServer = await ServerSocket.bind(
|
||||||
InternetAddress(socketAddr, type: InternetAddressType.unix), 0);
|
InternetAddress(socketAddr, type: InternetAddressType.unix), 0);
|
||||||
debugPrint('Python output Socket Server is listening on $socketAddr');
|
debugPrint('Python output Socket Server is listening on $socketAddr');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue