|
|
@ -117,7 +117,7 @@ public: |
|
|
|
int64 nLastRecv; |
|
|
|
int64 nLastRecv; |
|
|
|
int64 nLastSendEmpty; |
|
|
|
int64 nLastSendEmpty; |
|
|
|
int64 nTimeConnected; |
|
|
|
int64 nTimeConnected; |
|
|
|
unsigned int nHeaderStart; |
|
|
|
int nHeaderStart; |
|
|
|
unsigned int nMessageStart; |
|
|
|
unsigned int nMessageStart; |
|
|
|
CAddress addr; |
|
|
|
CAddress addr; |
|
|
|
int nVersion; |
|
|
|
int nVersion; |
|
|
@ -299,7 +299,7 @@ public: |
|
|
|
|
|
|
|
|
|
|
|
void AbortMessage() |
|
|
|
void AbortMessage() |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (nHeaderStart == -1) |
|
|
|
if (nHeaderStart < 0) |
|
|
|
return; |
|
|
|
return; |
|
|
|
vSend.resize(nHeaderStart); |
|
|
|
vSend.resize(nHeaderStart); |
|
|
|
nHeaderStart = -1; |
|
|
|
nHeaderStart = -1; |
|
|
@ -319,7 +319,7 @@ public: |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (nHeaderStart == -1) |
|
|
|
if (nHeaderStart < 0) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
// Set the size
|
|
|
|
// Set the size
|
|
|
@ -344,7 +344,7 @@ public: |
|
|
|
|
|
|
|
|
|
|
|
void EndMessageAbortIfEmpty() |
|
|
|
void EndMessageAbortIfEmpty() |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (nHeaderStart == -1) |
|
|
|
if (nHeaderStart < 0) |
|
|
|
return; |
|
|
|
return; |
|
|
|
int nSize = vSend.size() - nMessageStart; |
|
|
|
int nSize = vSend.size() - nMessageStart; |
|
|
|
if (nSize > 0) |
|
|
|
if (nSize > 0) |
|
|
|