diff options
-rw-r--r-- | Modules/socketmodule.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 21fcab0..1874541 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -1690,8 +1690,10 @@ PySocketSock_new(PyTypeObject *type, PyObject *args, PyObject *kwds) PyObject *new; new = type->tp_alloc(type, 0); - if (new != NULL) + if (new != NULL) { ((PySocketSockObject *)new)->sock_fd = -1; + ((PySocketSockObject *)new)->errorhandler = &PySocket_Err; + } return new; } |