Flushing and Write timeout

The virtual and physical port will be flushed before used and the
virtual port's write timeout is set to 0 (there was a bug where it will
get stuck)