mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Address connect errors in logs (#4882)
This commit is contained in:
parent
064b362d60
commit
0deb037035
2 changed files with 8 additions and 3 deletions
|
|
@ -1701,9 +1701,14 @@ TcpServerSocketInterface::TcpServerSocketInterface(Servatrice *_server,
|
|||
socket = new QTcpSocket(this);
|
||||
socket->setSocketOption(QAbstractSocket::LowDelayOption, 1);
|
||||
connect(socket, SIGNAL(readyRead()), this, SLOT(readClient()));
|
||||
connect(socket, SIGNAL(disconnected()), this, SLOT(catchSocketDisconnected()));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||
connect(socket, SIGNAL(errorOccurred(QAbstractSocket::SocketError)), this,
|
||||
SLOT(catchSocketError(QAbstractSocket::SocketError)));
|
||||
#else
|
||||
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this,
|
||||
SLOT(catchSocketError(QAbstractSocket::SocketError)));
|
||||
connect(socket, SIGNAL(disconnected()), this, SLOT(catchSocketDisconnected()));
|
||||
#endif
|
||||
}
|
||||
|
||||
TcpServerSocketInterface::~TcpServerSocketInterface()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue