From f1365135f1dd0b57849317b77e8bc9a1e0fd6307 Mon Sep 17 00:00:00 2001
From: Raimo Niskanen
Date: Wed, 22 Feb 2017 15:50:07 +0100
Subject: Clarify code_change and callback mode change
---
lib/stdlib/doc/src/gen_statem.xml | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/lib/stdlib/doc/src/gen_statem.xml b/lib/stdlib/doc/src/gen_statem.xml
index b20abbea5d..d19602b67c 100644
--- a/lib/stdlib/doc/src/gen_statem.xml
+++ b/lib/stdlib/doc/src/gen_statem.xml
@@ -1685,6 +1685,19 @@ handle_event(_, _, State, Data) ->
It is recommended to use an atom as Reason since
it will be wrapped in an {error,Reason} tuple.
+
+ Also note when upgrading a gen_statem,
+ this function and hence
+ the Change={advanced,Extra} parameter in the
+ appup file
+ is not only needed to update the internal state
+ or to act on the Extra argument.
+ It is also needed if an upgrade or downgrade should change
+ callback mode,
+ or else the callback mode after the code change
+ will not be honoured,
+ most probably causing a server crash.
+
--
cgit v1.2.3