@ -1147,12 +1147,10 @@ void CConnman::ThreadSocketHandler()
// * Hand off all complete messages to the processor, to be handled without
// * Hand off all complete messages to the processor, to be handled without
// blocking here.
// blocking here.
{
{
TRY_LOCK ( pnode - > cs_vSend , lockSend ) ;
LOCK ( pnode - > cs_vSend ) ;
if ( lockSend ) {
if ( ! pnode - > vSendMsg . empty ( ) ) {
if ( ! pnode - > vSendMsg . empty ( ) ) {
FD_SET ( pnode - > hSocket , & fdsetSend ) ;
FD_SET ( pnode - > hSocket , & fdsetSend ) ;
continue ;
continue ;
}
}
}
}
}
{
{
@ -1272,12 +1270,10 @@ void CConnman::ThreadSocketHandler()
continue ;
continue ;
if ( FD_ISSET ( pnode - > hSocket , & fdsetSend ) )
if ( FD_ISSET ( pnode - > hSocket , & fdsetSend ) )
{
{
TRY_LOCK ( pnode - > cs_vSend , lockSend ) ;
LOCK ( pnode - > cs_vSend ) ;
if ( lockSend ) {
size_t nBytes = SocketSendData ( pnode ) ;
size_t nBytes = SocketSendData ( pnode ) ;
if ( nBytes ) {
if ( nBytes ) {
RecordBytesSent ( nBytes ) ;
RecordBytesSent ( nBytes ) ;
}
}
}
}
}
@ -1875,9 +1871,8 @@ void CConnman::ThreadMessageHandler()
// Send messages
// Send messages
{
{
TRY_LOCK ( pnode - > cs_vSend , lockSend ) ;
LOCK ( pnode - > cs_sendProcessing ) ;
if ( lockSend )
GetNodeSignals ( ) . SendMessages ( pnode , * this , flagInterruptMsgProc ) ;
GetNodeSignals ( ) . SendMessages ( pnode , * this , flagInterruptMsgProc ) ;
}
}
if ( flagInterruptMsgProc )
if ( flagInterruptMsgProc )
return ;
return ;