Update Mozilla upstream (#790)

* Update Mozilla upstream
This commit is contained in:
Mykola Baibuz 2024-05-08 22:02:02 +01:00 committed by GitHub
parent 24759c92ad
commit 5bd8c33a6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 319 additions and 172 deletions

View file

@ -83,7 +83,7 @@ void MacOSPingSender::sendPing(const QHostAddress& dest, quint16 sequence) {
packet.icmp_seq = htons(sequence);
packet.icmp_cksum = inetChecksum(&packet, sizeof(packet));
if (sendto(m_socket, (char*)&packet, sizeof(packet), 0,
if (sendto(m_socket, (char*)&packet, sizeof(packet), MSG_NOSIGNAL,
(struct sockaddr*)&addr, sizeof(addr)) != sizeof(packet)) {
logger.error() << "ping sending failed:" << strerror(errno);
emit criticalPingError();
@ -107,9 +107,9 @@ void MacOSPingSender::socketReady() {
iov.iov_base = packet;
iov.iov_len = IP_MAXPACKET;
ssize_t rc = recvmsg(m_socket, &msg, MSG_DONTWAIT);
ssize_t rc = recvmsg(m_socket, &msg, MSG_DONTWAIT | MSG_NOSIGNAL);
if (rc <= 0) {
logger.error() << "Recvmsg failed";
logger.error() << "Recvmsg failed:" << strerror(errno);
return;
}