I am working with flutter. And previously my code works very well now. When I debug, I have the error:
Exception has occurred.
SocketException (SocketException: Connection failed (OS Error: Too many open files, errno = 24), address = 192.168.8.102, port = 8080).
My code
static Future<List> getByPhone(String phone) async {
http.Response response = await http.get(
Config.serverAddress + "/**/***/getByPhone?phone=" + phone+"&key="+Config.key,
headers: Config.userHeader);
if (response.statusCode == 200) {
List result = jsonDecode(response.body) as List;
Config.goodConnection = 1;
return result;
}
Config.goodConnection = 0;
return [];
}