Fixed Bad SSL Timeout code.

* Added TS check to SSL_RETURN_ZERO code. 
	- Existing code was dependent on tick rate. (could kill connection in 2-3 seconds)
	- If nothing is received within 15 seconds - the connection will be killed.
  * Removed "No send if RETURN_ZERO" check. 
	- This causes deadlocks and kills connections.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3287 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2010-07-13 12:13:56 +00:00
parent 728d755af8
commit 31c9832978
2 changed files with 15 additions and 11 deletions

View file

@ -189,6 +189,7 @@ virtual int net_internal_fcntl_nonblock(int fd) { return unix_fcntl_nonblock(fd)
bool sameLAN; /* flag use to allow high-speed transfers */
int n_read_zero; /* a counter to determine if the connection is really dead */
time_t mReadZeroTS; /* timestamp of first READ_ZERO occurance */
int ssl_connect_timeout; /* timeout to ensure that we don't get stuck (can happen on udp!) */