flash: startup.tcl: do not disable polling when not exiting
[fw/openocd] / src / flash / startup.tcl
index fbb8d8ee498249538aed598e186e31a1404479a3..ed905e9424af034f6c9c7300f994eb50dbb88b57 100644 (file)
@@ -62,8 +62,10 @@ proc program {filename args} {
 
                if {[info exists reset]} {
                        # reset target if requested
-                       # also disable target polling, we are shutting down anyway
-                       poll off
+                       if {$exit == 1} {
+                               # also disable target polling, we are shutting down anyway
+                               poll off
+                       }
                        echo "** Resetting Target **"
                        reset run
                }