Skip to content

Commit 3b42503

Browse files
committed
add close_connection=True
1 parent e62485b commit 3b42503

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

teach/learning.py

+2
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,14 @@ def check_cert():
5959
class LearningHTTPRequestHandler(BaseHTTPRequestHandler):
6060

6161
def do_GET(self):
62+
self.close_connection = True
6263
if self.path != '/':
6364
return self.send_error(404)
6465
self._sendHttpHeader('text/html')
6566
self._sendHttpBody(HTML_INDEX)
6667

6768
def do_POST(self):
69+
self.close_connection = True
6870
if self.path != '/run':
6971
return self.send_error(400)
7072
print('Prepare code...')

0 commit comments

Comments
 (0)