aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 78f8e72fb0..03d32526bc 100644
--- a/src/net.h
+++ b/src/net.h
@@ -42,6 +42,7 @@ unsigned short GetListenPort();
bool BindListenPort(const CService &bindAddr, std::string& strError=REF(std::string()));
void StartNode(void* parg);
bool StopNode();
+void SocketSendData(CNode *pnode);
enum
{
@@ -437,6 +438,10 @@ public:
printf("(%d bytes)\n", nSize);
}
+ // If write queue empty, attempt "optimistic write"
+ if (nHeaderStart == 0)
+ SocketSendData(this);
+
nHeaderStart = -1;
nMessageStart = -1;
LEAVE_CRITICAL_SECTION(cs_vSend);