Fix a bug with timeout error handling

This change updates how the server handles SSL/TLS timeout errors
when reading incoming client requests. Timeouts are now
interpreted as session ending events, resulting in a closed
connection as opposed to the original recurring error log message
that was produced.
This commit is contained in:
Peter Hamilton 2018-06-05 09:50:35 -04:00
parent fcae8a5048
commit 011ffd17b6
1 changed files with 5 additions and 1 deletions

View File

@ -111,7 +111,11 @@ class KmipSession(threading.Thread):
self._logger.info("Stopping session: {0}".format(self.name))
def _handle_message_loop(self):
try:
request_data = self._receive_request()
except socket.timeout:
return
request = messages.RequestMessage()
max_size = self._max_response_size