only disconnect if write fails, not if writeQueue closes