[asterisk-commits] moy: branch moy/webrtc-trunk r401301 - /team/moy/webrtc-trunk/res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 21 01:22:08 CDT 2013


Author: moy
Date: Mon Oct 21 01:22:06 2013
New Revision: 401301

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=401301
Log:
Ignore EAGAIN errors when reading from a websocket, just go back to wait for data

Modified:
    team/moy/webrtc-trunk/res/res_http_websocket.c

Modified: team/moy/webrtc-trunk/res/res_http_websocket.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/webrtc-trunk/res/res_http_websocket.c?view=diff&rev=401301&r1=401300&r2=401301
==============================================================================
--- team/moy/webrtc-trunk/res/res_http_websocket.c (original)
+++ team/moy/webrtc-trunk/res/res_http_websocket.c Mon Oct 21 01:22:06 2013
@@ -372,7 +372,7 @@
 		for (sanity = 10; sanity; sanity--) { \
 			clearerr(session->f); \
 			rlen = fread(rbuf, 1, xlen, session->f); \
-			if (0 == rlen && ferror(session->f)) { \
+			if (0 == rlen && ferror(session->f) && errno != EAGAIN) { \
 				ast_log(LOG_ERROR, "Error reading from web socket!\n"); \
 				(*opcode) = AST_WEBSOCKET_OPCODE_CLOSE; \
 				session->closing = 1; \




More information about the asterisk-commits mailing list