• R/O
  • SSH
  • HTTPS

tidesnet: Commit


Commit MetaInfo

Revision84 (tree)
Time2020-05-02 00:11:03
Authorquiret

Log Message

- bugfix for a possible infinite loop

Change Summary

Incremental Difference

--- http_framework/include/http_msg_receiver.h (revision 83)
+++ http_framework/include/http_msg_receiver.h (revision 84)
@@ -115,6 +115,12 @@
115115
116116 size_t read_count = clientSock->Read( data, req_len, TidesNetwork::eReceiveFlag::RECEIVE_PARTIAL );
117117
118+ if ( read_count == 0 )
119+ {
120+ // Connection has been closed; we must handle this case.
121+ break;
122+ }
123+
118124 // If we have received too many bytes (the client just keeps on spamming us with crap), then we have valid
119125 // concerns about their authenticity thus bail.
120126 bool couldAdvance = this->pushbuf.AdvanceFetchIter( read_count );
Show on old repository browser