Closed paulhoule closed 5 years ago
Note the root cause in that error message is not that data_received() failed (it worked just fine) but that the 'message' key was not found.
One thing I want to know is which exact call failed.
It could be that a particular result really should have come back empty. We should never get a crash like that if this is the case.
It also could be that the system was slow to wake up and behaved abnormally for a short time.
To clarify the remarks above.
The reception of data worked just fine. Then the asyncio system called a data_received() function I wrote and that failed.
That particular selector comes from selector_events.py and if I understand it right, something might happen differently if I used a different eventloop implementation.
Once the data_received call throws an exception we lose control of what is happening. That is real bad. This may mess up our connection, but it also may mess up our own data structures since we have a list of futures associated with callbacks and that future will still be in the list of callbacks if we do nothing about it.
Note additionally that we are getting back no "message" in the branch where we are handling a server-generated event.
I ran my "wake up" job this morning and it failed to run. I got the following error message: