[asterisk-commits] moy: branch moy/webrtc-11 r401302 - /team/moy/webrtc-11/res/res_http_websocket.c

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


Author: moy
Date: Mon Oct 21 01:34:36 2013
New Revision: 401302

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

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

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




More information about the asterisk-commits mailing list