add stop method to client to cleanly close all connections