Index: tool/tserver.c ================================================================== --- tool/tserver.c +++ tool/tserver.c @@ -266,10 +266,11 @@ static void *handle_client(void *pArg){ char zCmd[32*1024]; /* Read buffer */ int nCmd = 0; /* Valid bytes in zCmd[] */ int res; /* Result of read() call */ int rc = SQLITE_OK; + int j; ClientCtx ctx; memset(&ctx, 0, sizeof(ClientCtx)); ctx.fd = (int)(intptr_t)pArg; @@ -344,10 +345,14 @@ }while( rc==SQLITE_OK && nConsume>0 ); } fprintf(stdout, "Client %d disconnects\n", ctx.fd); close(ctx.fd); + for(j=0; j