Commit 090c78ca authored by armin's avatar armin
Browse files

Merge branch 'iosWS' into 'master'

iremoved specil ios case as it now works

See merge request !124
parents 5948f653 cec2204b
......@@ -53,10 +53,10 @@ void MeteorDDP::init( const QString &pUri )
connect( &mWebsocket, &QWebSocket::connected, this, &MeteorDDP::onConnected, Qt::UniqueConnection );
connect( &mWebsocket, &QWebSocket::disconnected, this, &MeteorDDP::ddpDisconnected );
connect( this, &MeteorDDP::sendMessageSignal, this, &MeteorDDP::sendJson, Qt::UniqueConnection );
connect( &mWebsocket, QOverload<QAbstractSocket::SocketError>::of(&QWebSocket::error),
[=](QAbstractSocket::SocketError error){
qDebug()<<mWebsocket.errorString();
});
connect( &mWebsocket, QOverload<QAbstractSocket::SocketError>::of( &QWebSocket::error ),
[ = ]( QAbstractSocket::SocketError error ) {
qDebug() << mWebsocket.errorString();
} );
mWebsocket.open( wsUri );
QDateTime now = QDateTime::currentDateTime();
......@@ -231,8 +231,6 @@ void MeteorDDP::sendRequest( const QSharedPointer<DDPRequest> &pDdpRequest )
void MeteorDDP::resume()
{
qDebug() << "resuming ddp";
#if defined(Q_OS_ANDROID) || defined(Q_OS_LINUX) ||defined(Q_OS_WIN) || defined(Q_OS_OSX)
qDebug() << "websocket valid: " << mWebsocket.isValid();
QUrl wsUri = QUrl( QStringLiteral( "wss://" ) + mWebsocketUri + QStringLiteral( "/websocket" ) );
......@@ -259,18 +257,6 @@ void MeteorDDP::resume()
// connectWithServer();
}
#else
qDebug() << "resuming ddp";
mWebsocket.close();
connect(&mWebsocket , &QWebSocket::disconnected, [&]() {
qDebug()<<"disconnected";
init( mWebsocketUri );
} );
mWebsocket.close();
#endif
}
void MeteorDDP::unsetResponseBinding( const QString &pId )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment