Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(31)

Unified Diff: lib/DJabberd/Connection.pm

Issue 2341: avoid ssl_eof error on SSL_WANT_READ and friends SVN Base: http://code.sixapart.com/svn/djabberd/trunk/DJabberd
Patch Set: response to comments Created 1 year, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side by-side-diff with in-line comments
Download patch
Index: lib/DJabberd/Connection.pm
===================================================================
--- lib/DJabberd/Connection.pm (revision 774)
+++ lib/DJabberd/Connection.pm (working copy)
@@ -492,7 +492,11 @@
# just be the underlying socket was readable, but there
# wasn't enough of an SSL packet for OpenSSL/etc to return
# any unencrypted data back to us.
- if (++$self->{'ssl_empty_read_ct'} >= 10) {
+ # We call 'actual_error_on_empty_read' to avoid counting
+ # SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE as 'actual' errors
+ my $err = DJabberd::Stanza::StartTLS->actual_error_on_empty_read($ssl);
+ if($err && ++$self->{'ssl_empty_read_ct'} >= 10) {
+ $self->log->warn("SSL Read error: $err (assuming ssl_eof)");
$self->close('ssl_eof');
}
return;
« no previous file | lib/DJabberd/Stanza/StartTLS.pm » ('j')

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r483