Commits

Ruslan Osmanov  committed fc8198e

Fix: With OPT_LEAVE_SOCKETS_BLOCKING flag EventListener::__construct turned fd to non-blocking mode

  • Participants
  • Parent commits 61ea0f2

Comments (0)

Files changed (2)

File classes/listener.c

 			return;
 		}
 
-		/* Make sure that the socket is in non-blocking mode(libevent's tip) */
-		evutil_make_socket_nonblocking(fd);
+		if (flags & ~LEV_OPT_LEAVE_SOCKETS_BLOCKING) {
+			/* Make sure that the socket is in non-blocking mode(libevent's tip) */
+			evutil_make_socket_nonblocking(fd);
+		}
 
 		PHP_EVENT_FETCH_LISTENER(l, zself);
 
     <email>osmanov@php.net</email>
     <active>yes</active>
   </lead>
-  <date>2013-03-02</date>
+  <date>2013-03-03</date>
   <!--{{{ Current version -->
   <version>
     <release>1.2.7</release>
   <notes><![CDATA[
   Fix: possible memory access violations in EventBufferEvent input/output property handlers
   Change: Event::$timer_pending property removed; generic Event::$pending property added
+  Fix: With OPT_LEAVE_SOCKETS_BLOCKING flag EventListener::__construct turned fd to non-blocking mode
   ]]></notes>
   <!--}}}-->
   <!--{{{ Contents -->
   </extsrcrelease>
   <!--{{{ changelog-->
   <changelog>
-    <!--{{{ Current version -->
+    <!--{{{ 1.2.7-beta-->
     <release>
       <version>
         <release>1.2.7</release>
       <notes><![CDATA[
   Fix: possible memory access violations in EventBufferEvent input/output property handlers
   Change: Event::$timer_pending property removed; generic Event::$pending property added
+  Fix: With OPT_LEAVE_SOCKETS_BLOCKING flag EventListener::__construct turned fd to non-blocking mode
   ]]></notes>
     </release>
     <!--}}}-->