Using all_channels_writable can cause inconsistent behavior