mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 13:03:55 +02:00
try rebinding on error writing/reading from bound socket
This commit is contained in:
parent
a55c723842
commit
d0bd4a7d47
1 changed files with 8 additions and 0 deletions
|
@ -500,10 +500,18 @@ std::vector<HifiSockAddr> Socket::getConnectionSockAddrs() {
|
|||
|
||||
void Socket::handleSocketError(QAbstractSocket::SocketError socketError) {
|
||||
qCDebug(networking) << "udt::Socket (" << _udpSocket.state() << ") error - " << socketError << "(" << _udpSocket.errorString() << ")";
|
||||
#ifdef WIN32
|
||||
int wsaError = WSAGetLastError();
|
||||
qCDebug(networking) << "windows socket error " << wsaError;
|
||||
#endif
|
||||
#ifdef DEBUG_EVENT_QUEUE
|
||||
int nodeListQueueSize = ::hifi::qt::getEventQueueSize(thread());
|
||||
qCDebug(networking) << "Networking queue size - " << nodeListQueueSize;
|
||||
#endif // DEBUG_EVENT_QUEUE
|
||||
|
||||
if (_udpSocket.state() == QAbstractSocket::BoundState) {
|
||||
rebind();
|
||||
}
|
||||
}
|
||||
|
||||
void Socket::handleStateChanged(QAbstractSocket::SocketState socketState) {
|
||||
|
|
Loading…
Reference in a new issue