reset client to NULL, fixes segfault when reconnecting