Message192479
--- 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. |
|
Date |
User |
Action |
Args |
2013-07-06 18:34:03 | marto1 | set | recipients:
+ marto1, Roman.Valov |
2013-07-06 18:34:03 | marto1 | set | messageid: <1373135643.18.0.21145931822.issue18095@psf.upfronthosting.co.za> |
2013-07-06 18:34:03 | marto1 | link | issue18095 messages |
2013-07-06 18:34:02 | marto1 | create | |
|