]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Make all sockets non-blocking
authorMathieu Rene <mrene@avgs.ca>
Mon, 13 Jun 2011 20:41:52 +0000 (16:41 -0400)
committerMathieu Rene <mrene@avgs.ca>
Mon, 13 Jun 2011 20:42:18 +0000 (16:42 -0400)
src/mod/endpoints/mod_rtmp/rtmp_tcp.c

index 6ed2b49e67a0bf0062bfb674e40a8e05584e0f8f..b09cef7ad15d9f0f19a98c69cc618f41968dc6e3 100644 (file)
@@ -215,6 +215,11 @@ void *SWITCH_THREAD_FUNC rtmp_io_tcp_thread(switch_thread_t *thread, void *obj)
                                        }
                                } else {
                                        rtmp_session_t *newsession;
+                                       
+                                       if (switch_socket_opt_set(newsocket, SWITCH_SO_NONBLOCK, TRUE)) {
+                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Couldn't set socket as non-blocking\n");
+                                       }
+                                       
                                        if (rtmp_session_request(io->base.profile, &newsession) != SWITCH_STATUS_SUCCESS) {
                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "RTMP session request failed\n");
                                                switch_socket_close(newsocket);