- if(network_events.lNetworkEvents & READ_EVENTS) {
- io->cb(io->data, IO_READ);
+ /*
+ The fd might be available for write too. However, if we already fired the read callback, that
+ callback might have deleted the io (e.g. through terminate_connection()), so we can't fire the
+ write callback here. Instead, we loop back and let the writable io loop above handle it.
+ */