Improved override of the behavior in case of expired messages.
Applications should call disconnect() if they want to close the connection.
Merged branch '2.8.x' into 'master'.