[svn-commits] moy: branch moy/webrtc-12 r401300 - /team/moy/webrtc-12/res/res_http_websocket.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Oct 21 01:21:13 CDT 2013


Author: moy
Date: Mon Oct 21 01:21:10 2013
New Revision: 401300

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

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

Modified: team/moy/webrtc-12/res/res_http_websocket.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/webrtc-12/res/res_http_websocket.c?view=diff&rev=401300&r1=401299&r2=401300
==============================================================================
--- team/moy/webrtc-12/res/res_http_websocket.c (original)
+++ team/moy/webrtc-12/res/res_http_websocket.c Mon Oct 21 01:21:10 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 svn-commits mailing list