mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-08 23:12:16 +02:00
Cleanup
This commit is contained in:
parent
6e6bd18baa
commit
ca0c9e236b
2 changed files with 4 additions and 7 deletions
|
@ -452,6 +452,7 @@ void NodeList::sendDomainServerCheckIn() {
|
|||
static const int MAX_CHECKINS_TOGETHER = 20;
|
||||
static const int REBIND_CHECKIN_COUNT = 2;
|
||||
int outstandingCheckins = _domainHandler.getCheckInPacketsSinceLastReply();
|
||||
|
||||
if (outstandingCheckins > REBIND_CHECKIN_COUNT) {
|
||||
_nodeSocket.rebind();
|
||||
}
|
||||
|
|
|
@ -62,9 +62,9 @@ void Socket::bind(const QHostAddress& address, quint16 port) {
|
|||
#elif defined(Q_OS_WIN)
|
||||
auto sd = _udpSocket.socketDescriptor();
|
||||
int val = 0; // false
|
||||
if (setsockopt(sd, IPPROTO_IP, IP_DONTFRAGMENT, (const char*)&val, sizeof(val))) {
|
||||
auto err = WSAGetLastError();
|
||||
qCWarning(networking) << "Socket::bind Cannot setsockopt IP_DONTFRAGMENT" << err;
|
||||
if (setsockopt(sd, IPPROTO_IP, IP_DONTFRAGMENT, (const char *)&val, sizeof(val))) {
|
||||
auto wsaErr = WSAGetLastError();
|
||||
qCWarning(networking) << "Socket::bind Cannot setsockopt IP_DONTFRAGMENT" << wsaErr;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -234,7 +234,6 @@ qint64 Socket::writeDatagram(const QByteArray& datagram, const HifiSockAddr& soc
|
|||
return -1;
|
||||
}
|
||||
qint64 bytesWritten = _udpSocket.writeDatagram(datagram, sockAddr.getAddress(), sockAddr.getPort());
|
||||
|
||||
int pending = _udpSocket.bytesToWrite();
|
||||
if (bytesWritten < 0 || pending) {
|
||||
int wsaError = 0;
|
||||
|
@ -243,9 +242,6 @@ qint64 Socket::writeDatagram(const QByteArray& datagram, const HifiSockAddr& soc
|
|||
#endif
|
||||
qCDebug(networking) << "udt::writeDatagram (" << _udpSocket.state() << ") error - " << wsaError << _udpSocket.error() << "(" << _udpSocket.errorString() << ")"
|
||||
<< (pending ? "pending bytes:" : "pending:") << pending;
|
||||
|
||||
qCDebug(networking) << "udt::writeDatagram (" << _udpSocket.state() << ") error - " << _udpSocket.error() << "(" << _udpSocket.errorString() << ")";
|
||||
|
||||
#ifdef DEBUG_EVENT_QUEUE
|
||||
int nodeListQueueSize = ::hifi::qt::getEventQueueSize(thread());
|
||||
qCDebug(networking) << "Networking queue size - " << nodeListQueueSize;
|
||||
|
|
Loading…
Reference in a new issue