Write queue after connect windows

Check for writability here instead of below, for consistency.