cleanup
close client if reconnect