This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author marto1
Recipients Roman.Valov, marto1
Date 2013-07-06.18:34:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1373135643.18.0.21145931822.issue18095@psf.upfronthosting.co.za>
In-reply-to
Content
--- a/Modules/socketmodule.c	Tue Jul 02 09:07:53 2013 -0400
+++ b/Modules/socketmodule.c	Sat Jul 06 21:08:40 2013 +0300
@@ -3673,6 +3673,15 @@
 {
     int how;
     int res;
+    struct sockaddr_in sin;
+    if (s->sock_type == SOCK_DGRAM){
+        memset((char *)&sin, 0, sizeof(sin));
+        sin.sin_family = AF_UNSPEC;
+        Py_BEGIN_ALLOW_THREADS
+        res = connect(s->sock_fd, (struct sockaddr *)&sin, sizeof(sin));
+        Py_END_ALLOW_THREADS
+        return Py_None;
+    }
 
     how = _PyLong_AsInt(arg);
     if (how == -1 && PyErr_Occurred())


The shutdown method seems a suitable candidate, but a disconnect() method(which is semantically more correct) could be introduced.
History
Date User Action Args
2013-07-06 18:34:03marto1setrecipients: + marto1, Roman.Valov
2013-07-06 18:34:03marto1setmessageid: <1373135643.18.0.21145931822.issue18095@psf.upfronthosting.co.za>
2013-07-06 18:34:03marto1linkissue18095 messages
2013-07-06 18:34:02marto1create