kill off ssh process when re-opening connection
[freeside.git] / FS / bin / freeside-selfservice-server
index d2358e3..f9571fa 100644 (file)
@@ -79,6 +79,11 @@ while (1) {
       warn "Storable error receiving packet from client".
            " (assuming lost connection): $@\n"
         if $Debug;
       warn "Storable error receiving packet from client".
            " (assuming lost connection): $@\n"
         if $Debug;
+      if ( $ssh_pid ) {
+        warn "sending TERM signal to ssh process $ssh_pid\n" if $Debug;
+        kill 'TERM', $ssh_pid;
+        $ssh_pid = 0;
+      }
       last;
     }
     warn "packet received\n".
       last;
     }
     warn "packet received\n".