diff --git a/src/seq/seq_if.c b/src/seq/seq_if.c index 84edcbad2a73f0aaaf64674bdd9a5709956d5685..6aae6f54f536fcf1bdb8697a744234b9da01d95a 100644 --- a/src/seq/seq_if.c +++ b/src/seq/seq_if.c @@ -626,10 +626,13 @@ epicsShareFunc pvStat seq_pvAssign(SS_ID ss, VAR_ID varId, const char *pvName) dbch->connected = FALSE; sp->connectCount--; - if (ch->monitored) - { - seq_camonitor(ch, FALSE); - } + /* Must not call seq_camonitor(ch, FALSE), it would give an + error because channel is already dead. pvVarDestroy takes + care that the monid inside the pvid gets invalidated. */ + + /* Note ch->monitored remains on because it is a configuration + value that belongs to the variable and newly created channels + for the same variable should inherit this configuration. */ } if (status != pvStatOK)