Only automatically close connection if an error occurs
Release v0.1.13.