Write queue after connect windows

we need to check if the handle is closing here and give an error.