Added logging of the reason for the connection when it's closed.
Warning for connection closed should only be issued on error
Merge branch 'log_close_reason' into develop