Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f4501dc authored by Rohit Sekhar's avatar Rohit Sekhar
Browse files

shouldBlockRequest: Don't block if socket connect fails

* On (re)boot:

  05-19 13:27:49.303   605   987 I netd    : DnsResolverService::setResolverConfiguration(100, [192.168.1.1], [], 1800, 25, 8, 64, 0, 0, [], []) -> (-22) (0.6ms)
  05-19 13:27:49.303   605   987 I netd    : setResolverConfiguration() -> ServiceSpecificException(22, "Invalid argument") <1.35ms>
  05-19 13:27:49.304  1574  1698 E DnsManager: Error setting DNS configuration: android.os.ServiceSpecificException: Invalid argument (code 22)

  ..which subsequently leads to connectivity check probes failing.

* Thanks to Alexandre for the hint
parent 4d66a6f2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -346,7 +346,7 @@ int shouldBlockRequest(const char* hostname, int uid){
	if (connect(sock, (struct sockaddr *)&server, len) < 0) {
		LOG(DEBUG) << "Socket: connect failed. Error";
                close(sock);
		return -1;
		return 0;
	}

	LOG(DEBUG) << "Socket: Connected";