|
@@ -37,7 +37,6 @@ class LodelWSGIHandler(wsgiref.simple_server.WSGIRequestHandler):
|
37
|
37
|
|
38
|
38
|
##@brief Method called by the socketserver to handle a request
|
39
|
39
|
def handle(self):
|
40
|
|
- print("addr : %s %s\n" % (self.client_address, type(self.request)))
|
41
|
40
|
#Register a signal handler for sigint in the child process
|
42
|
41
|
req_ref = self.request
|
43
|
42
|
def sigstop_handler_client(signal, frame):
|
|
@@ -76,7 +75,6 @@ class LodelWSGIHandler(wsgiref.simple_server.WSGIRequestHandler):
|
76
|
75
|
|
77
|
76
|
##@brief An attempt to solve the socket leak problem
|
78
|
77
|
def close(self):
|
79
|
|
- print("Closing request from handler : %s" % self.request)
|
80
|
78
|
self.request.close()
|
81
|
79
|
super().close()
|
82
|
80
|
|
|
@@ -131,7 +129,6 @@ def http_error(env, start_response, status = '500 internal server error', \
|
131
|
129
|
|
132
|
130
|
##@brief This method is run in a child process by the handler
|
133
|
131
|
def wsgi_router(env, start_response):
|
134
|
|
- print("\n\nCPROCPID = %d\n\n" % os.getpid()) #<-- print PID (for debug)
|
135
|
132
|
#Attempt to load a context
|
136
|
133
|
site_id = site_id_from_url(env['PATH_INFO'])
|
137
|
134
|
if site_id is None:
|
|
@@ -152,8 +149,6 @@ def wsgi_router(env, start_response):
|
152
|
149
|
|
153
|
150
|
##@brief Starts the server until a SIGINT is received
|
154
|
151
|
def main_loop():
|
155
|
|
- print("PID = %d" % os.getpid())
|
156
|
|
-
|
157
|
152
|
listen_addr = LISTEN_ADDR
|
158
|
153
|
listen_port = LISTEN_PORT
|
159
|
154
|
server = wsgiref.simple_server.make_server(
|