There are a number of things that targetd is calling that cannot
be executed concurrently. Make the service only handle one
request at a time.
Signed-off-by: Tony Asleson <tasleson(a)redhat.com>
---
targetd/main.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/targetd/main.py b/targetd/main.py
index 69ffa22..8db95d7 100644
--- a/targetd/main.py
+++ b/targetd/main.py
@@ -213,11 +213,11 @@ class TargetHandler(BaseHTTPRequestHandler):
self.wfile.write(rpcdata)
-class ThreadedHTTPServer(ThreadingMixIn, HTTPServer, object):
- """Handle requests in a separate thread."""
+class HTTPService(HTTPServer, object):
+ """Handle requests one at a time"""
-class TLSThreadedHTTPServer(ThreadedHTTPServer):
+class TLSHTTPService(HTTPService):
"""Also use TLS to encrypt the connection"""
def finish_request(self, sock, addr):
@@ -288,10 +288,10 @@ def main():
update_mapping()
if config['ssl']:
- server_class = TLSThreadedHTTPServer
+ server_class = TLSHTTPService
note = "(TLS yes)"
else:
- server_class = ThreadedHTTPServer
+ server_class = HTTPService
note = "(TLS no)"
try:
--
1.8.2.1