Proxy: fixed do_write handling in previous commit. As rightfully complained by MSVC, do_write variable was used uninitialized. Correct fix is to set it's initial value based on event happened.