@@ -23,9 +23,6 @@ You should have received a copy of the GNU Lesser General Public License
2323using System . Collections . Generic ;
2424using System . Linq ;
2525using System . Net . Sockets ;
26- #if ! NETFRAMEWORK
27- using System . Runtime . InteropServices ;
28- #endif
2926using System . Threading ;
3027
3128namespace NetMQ . Core . Utils
@@ -281,26 +278,7 @@ private void Loop()
281278 try
282279 {
283280 timeout = timeout != 0 ? timeout * 1000 : - 1 ;
284- #if NETFRAMEWORK
285281 Socket . Select ( readList , null , errorList , timeout ) ;
286- #else
287- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) )
288- {
289- // Socket.Select does not work properly on macOS .NET Core when readList and errorList are passed
290- // together. To avoid this problem, we call the Select function separately for errorList.
291- // Please refer to this issue: https://github.com/dotnet/corefx/issues/39617
292- SocketUtility . Select ( readList , null , null , timeout ) ;
293- // If the first select found readable sockets, use a non-blocking (0) timeout for the
294- // error check so we don't block indefinitely on a stale list before processing InEvent.
295- // Events queued by the first select (e.g. a ForceStop command) are not yet processed
296- // because InEvent runs after both selects, so a second infinite-wait here would deadlock.
297- SocketUtility . Select ( null , null , errorList , readList . Count > 0 ? 0 : timeout ) ;
298- }
299- else
300- {
301- Socket . Select ( readList , null , errorList , timeout ) ;
302- }
303- #endif
304282 }
305283 catch ( SocketException )
306284 {
0 commit comments