Fix cases where closed connection is closed again and where additional methods are received after sending the 'close' message.