regression fix for a mtssrv exception (occurs upon disconnection events)
parent
49fb2d5028
commit
e8937d3a47
|
@ -325,14 +325,7 @@ StreamBackend::StreamBackend(const std::string &thrName, Scheduler *scheduler,
|
||||||
m_memStream->setByteOrder(Stream::ENetworkByteOrder);
|
m_memStream->setByteOrder(Stream::ENetworkByteOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
StreamBackend::~StreamBackend() {
|
StreamBackend::~StreamBackend() { }
|
||||||
if (m_stream->getClass()->derivesFrom(MTS_CLASS(SocketStream))) {
|
|
||||||
SocketStream *sstream = static_cast<SocketStream *>(m_stream.get());
|
|
||||||
Log(EInfo, "Closing connection to %s - received %i KB / sent %i KB",
|
|
||||||
sstream->getPeer().c_str(), (int) (sstream->getReceivedBytes() / 1024),
|
|
||||||
(int) (sstream->getSentBytes() / 1024));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void StreamBackend::run() {
|
void StreamBackend::run() {
|
||||||
if (m_detach)
|
if (m_detach)
|
||||||
|
@ -489,6 +482,13 @@ void StreamBackend::run() {
|
||||||
Log(EWarn, "Removing stray resource %i", (*it).first);
|
Log(EWarn, "Removing stray resource %i", (*it).first);
|
||||||
m_scheduler->unregisterResource((*it).second);
|
m_scheduler->unregisterResource((*it).second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_stream->getClass()->derivesFrom(MTS_CLASS(SocketStream))) {
|
||||||
|
SocketStream *sstream = static_cast<SocketStream *>(m_stream.get());
|
||||||
|
Log(EInfo, "Closing connection to %s - received %i KB / sent %i KB",
|
||||||
|
sstream->getPeer().c_str(), (int) (sstream->getReceivedBytes() / 1024),
|
||||||
|
(int) (sstream->getSentBytes() / 1024));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StreamBackend::sendCancellation(int id, int numLost) {
|
void StreamBackend::sendCancellation(int id, int numLost) {
|
||||||
|
|
Loading…
Reference in New Issue