Kfsio library: fix socket counter update with pending connection close.