Fix memory leak on highload.

* dispatcher method in the framework's event loop class now checks both write and read event. In some cases, say frequently spamming write events, there was no other way for read events to be read. It led to the memory leak and response freezing.