Alternative solution to fix #345. 

Not necessarily a better solution, but stays consistent with the previous code. I also added a fix for an logging error caused by this line.

elif not self.is_closing:
    LOGGER.warning('Unknown state on disconnect: %i',
                   self.connection_state)

I have gone through the code, and my only assumption is that this should self.is_closed, and not self.is_closing.