mirror of
https://github.com/python/cpython.git
synced 2025-09-08 18:01:44 +00:00
Revert last change, which was incorrect.
This commit is contained in:
parent
8c4f4178cb
commit
b8e138aa23
3 changed files with 7 additions and 8 deletions
|
@ -445,12 +445,7 @@ class TCPServer(BaseServer):
|
||||||
|
|
||||||
def close_request(self, request):
|
def close_request(self, request):
|
||||||
"""Called to clean up an individual request."""
|
"""Called to clean up an individual request."""
|
||||||
try:
|
request.shutdown(socket.SHUT_WR)
|
||||||
#explicitly shutdown. socket.close() merely releases
|
|
||||||
#the socket and waits for GC to perform the actual close.
|
|
||||||
request.shutdown(socket.SHUT_WR)
|
|
||||||
except socket.error:
|
|
||||||
pass #some platforms may raise ENOTCONN here
|
|
||||||
request.close()
|
request.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -182,8 +182,6 @@ class SysModuleTest(unittest.TestCase):
|
||||||
"under Windows, test would generate a spurious crash dialog")
|
"under Windows, test would generate a spurious crash dialog")
|
||||||
code = textwrap.dedent("""
|
code = textwrap.dedent("""
|
||||||
import sys
|
import sys
|
||||||
import msvcrt
|
|
||||||
msvcrt.SetErrorMode(msvcrt.SEM_FAILCRITICALERRORS)
|
|
||||||
|
|
||||||
def f():
|
def f():
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -130,6 +130,12 @@ win32_ExitProcess(PyObject *self, PyObject *args)
|
||||||
if (!PyArg_ParseTuple(args, "I", &uExitCode))
|
if (!PyArg_ParseTuple(args, "I", &uExitCode))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
#if defined(Py_DEBUG)
|
||||||
|
SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOALIGNMENTFAULTEXCEPT|SEM_NOGPFAULTERRORBOX|SEM_NOOPENFILEERRORBOX);
|
||||||
|
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
ExitProcess(uExitCode);
|
ExitProcess(uExitCode);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue