Skip to content

Commit aee9b23

Browse files
committed
Added extra sleep in between writes for peace of mind of openssl.
1 parent a9b464a commit aee9b23

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

webserver/proxyclient.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ namespace http {
132132
_writebuf.push_back(boost::asio::buffer(writePdu->content(), writePdu->length()));
133133
try {
134134
boost::asio::write(_socket, _writebuf);
135+
boost::this_thread::sleep_for(boost::chrono::milliseconds(100)); // for peace of mind of openssl
135136
}
136137
catch (std::exception& e) {
137138
if (doStop) {
@@ -652,6 +653,10 @@ namespace http {
652653
if (error.value() == 0x140000DB) {
653654
// short read
654655
_log.Log(LOG_ERROR, "PROXY: Read failed, , short read");
656+
// Initiate graceful connection closure.
657+
_socket.lowest_layer().close();
658+
// we are disconnected, reconnect
659+
Reconnect();
655660
return;
656661
}
657662
_log.Log(LOG_ERROR, "PROXY: Read failed, code = %d. Reconnecting: %s", error.value(), error.message().c_str());

www/html5.appcache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# ref 1175
2+
# ref 1177
33

44
CACHE:
55
# CSS

0 commit comments

Comments
 (0)