[SPARK-2583] ConnectionManager cannot distinguish whether error occurred or not

```scala
val hasError = buffer.get() != 0
```