Commit f640f4bb authored by Ranjeeth Dasineni's avatar Ranjeeth Dasineni Committed by facebook-github-bot-1

Change NotificationQueue assert -> CHECK

Summary: If the eventFd goes bad, NotificationQueue consumers can cause their event loop to spin indefinitely.  If libevent gets POLLERR on the fd, it calls handlerReady, which triggers a read.  The read will fail, but the callback is never uninstalled.  I'm not sure it would be easy to recover gracefully from this, so crash hard instead.

Reviewed By: yfeldblum, pgriess

Differential Revision: D2550270

fb-gh-sync-id: c9575fbda778b3625da6d9db6b0542b8263f230a
parent b4c40ee9
...@@ -506,7 +506,7 @@ class NotificationQueue { ...@@ -506,7 +506,7 @@ class NotificationQueue {
if (rc < 0) { if (rc < 0) {
// EAGAIN should pretty much be the only error we can ever get. // EAGAIN should pretty much be the only error we can ever get.
// This means someone else already processed the only available message. // This means someone else already processed the only available message.
assert(errno == EAGAIN); CHECK_EQ(errno, EAGAIN);
return false; return false;
} }
assert(value == 1); assert(value == 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment