010212 Refactor: tools: Split one shot mode out into its own function.

1 file Authored by Chris Lumens 4 years ago, Committed by Packit Service 4 years ago,
    Refactor: tools: Split one shot mode out into its own function.
    
    Also, the connection error handling function can get split out on its
    own as well to allow it to be reused in both the one shot and loop
    cases.
    
        
file modified
+43 -26