Merge pull request #2274 from esdrubal/udpclientreceive
[mono.git] / mcs / class / System / System.Net.Sockets / SafeSocketHandle.cs
index 00f14114077d259e3d7956be41c6f2074d686e4e..e0f8569969f680c662d71a55e2019a5650015656 100644 (file)
@@ -37,6 +37,10 @@ namespace System.Net.Sockets {
                        int error = 0;
 
                        Socket.Blocking_internal (handle, false, out error);
+#if MOBILE_STATIC
+                       /* It's only for platforms that do not have working syscall abort mechanism, like WatchOS and TvOS */
+                       Socket.Shutdown_internal (handle, SocketShutdown.Both, out error);
+#endif
 
                        if (blocking_threads != null) {
                                int abort_attempts = 0;