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

Commit 740996fe authored by Aayush Gupta's avatar Aayush Gupta
Browse files

Merge branch '145devices-r-sockfail_unblock' into 'v1-r'

shouldBlockRequest: Don't block if socket connect fails

See merge request !4
parents 4d66a6f2 4f4501dc
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -346,7 +346,7 @@ int shouldBlockRequest(const char* hostname, int uid){
	if (connect(sock, (struct sockaddr *)&server, len) < 0) {
	if (connect(sock, (struct sockaddr *)&server, len) < 0) {
		LOG(DEBUG) << "Socket: connect failed. Error";
		LOG(DEBUG) << "Socket: connect failed. Error";
                close(sock);
                close(sock);
		return -1;
		return 0;
	}
	}


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