log: fix typos
py: more debug info when assert failure
client: fix state assertion

when connect error occuring, client may be in
disconnecting state, so is connect failure