File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
core/pv/src/main/java/org/phoebus/pv/pva Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,16 @@ public void write(final Object new_value) throws Exception
175175 // in case some detail in the 'request' caused the PVA server
176176 // to perform a put-callback type of operation,
177177 // and a GUI calling write() expect an immediate return.
178+
179+ // Perform a disconnect check right now to alert caller
180+ // of clearly disconnected channel
181+ if (isDisconnected (read ()))
182+ throw new Exception ("Channel '" + getName () + "' is not connected" );
183+
184+ // The channel could still disconnect in the middle of the write,
185+ // the channel may be read-only or experience other errors
186+ // that we'll only see as log messages since we don't want to
187+ // wait in 'get()' here...
178188 channel .write (name_helper .getWriteRequest (), new_value );
179189 }
180190
You can’t perform that action at this time.
0 commit comments