Unsubscribe from topic before closing connection

This will avoid the forceful unsubscribe.