Permalink
Browse files

Add some more logging

  • Loading branch information...
1 parent 62d316b commit fc8a0f2b070d9caa0739a781cf3d09c5ceb9001b @celeron55 committed Nov 7, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/connection.cpp
View
@@ -1218,7 +1218,7 @@ void ConnectionThread::send(u16 peer_id, u8 channelnum,
m_peer_tcps.find(peer_id);
if(it != m_peer_tcps.end()){
SharedPtr<TCPSocket> &socket = it->second;
- dout_con<<getDesc()<<"Sending "<<data.getSize()
+ dout_con<<getDesc()<<" Sending "<<data.getSize()
<<" bytes through TCP"<<std::endl;
SharedBuffer<u8> b(data.getSize()+4);
writeU32(&b[0], data.getSize());
@@ -1228,6 +1228,7 @@ void ConnectionThread::send(u16 peer_id, u8 channelnum,
}
} catch(SendFailedException &e){
// Use UDP instead
+ derr_con<<getDesc()<<" TCP failed; trying UDP instead"<<std::endl;
}
Channel *channel = &(peer->channels[channelnum]);

0 comments on commit fc8a0f2

Please sign in to comment.