client: fix a race condition
client: fix a race condition

mischief/kite,rjeczalik/kite,ppknap/kite,280455936/kite,280455936/kite,leeola/kite,rjeczalik/kite,koding/kite,mischief/kite,wingyplus/kite,koding/kite,wingyplus/kite,ppknap/kite,koding/kite,leeola/kite,ppknap/kite,rjeczalik/kite