Changeset View
Changeset View
Standalone View
Standalone View
src/core/connection.cpp
Show First 20 Lines • Show All 307 Lines • ▼ Show 20 Line(s) | 304 | if (mLogFile) { | |||
---|---|---|---|---|---|
308 | mLogFile->write(" "); | 308 | mLogFile->write(" "); | ||
309 | mLogFile->write(Protocol::debugString(cmd).toUtf8()); | 309 | mLogFile->write(Protocol::debugString(cmd).toUtf8()); | ||
310 | mLogFile->write("\n\n"); | 310 | mLogFile->write("\n\n"); | ||
311 | mLogFile->flush(); | 311 | mLogFile->flush(); | ||
312 | } | 312 | } | ||
313 | 313 | | |||
314 | if (mSocket && mSocket->isOpen()) { | 314 | if (mSocket && mSocket->isOpen()) { | ||
315 | Protocol::DataStream stream(mSocket.data()); | 315 | Protocol::DataStream stream(mSocket.data()); | ||
316 | stream << tag; | | |||
317 | try { | 316 | try { | ||
317 | stream << tag; | ||||
318 | Protocol::serialize(mSocket.data(), cmd); | 318 | Protocol::serialize(mSocket.data(), cmd); | ||
319 | } catch (const Akonadi::ProtocolException &e) { | 319 | } catch (const Akonadi::ProtocolException &e) { | ||
320 | qCWarning(AKONADICORE_LOG) << "Protocol Exception:" << QString::fromUtf8(e.what()); | 320 | qCWarning(AKONADICORE_LOG) << "Protocol Exception:" << QString::fromUtf8(e.what()); | ||
321 | mSocket->close(); | 321 | mSocket->close(); | ||
322 | reconnect(); | 322 | reconnect(); | ||
323 | return; | 323 | return; | ||
324 | } | 324 | } | ||
325 | if (!mSocket->waitForBytesWritten()) { | 325 | if (!mSocket->waitForBytesWritten()) { | ||
Show All 9 Lines |