{
}
- bool closii;
-
- /*protected override void Dispose (bool disposing)
- {
- lock (this) {
- if (!closii) {
-
- closii = true;
- int error = 0;
- Socket.Blocking_internal (handle, false, out error);
- //AbortRegisteredThreads ();
- Socket.Close_internal (handle, out error);
- //Console.Error.WriteLine ("Closed "+ handle);
- }
- }
- base.Dispose (disposing);
- }*/
-
protected override bool ReleaseHandle ()
{
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;