The protocol may not use an explicit API to close the connection and just close the socket instead. Add option to suppress errors in such case.