X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/eaf53edbc38a2987348e92205a2fd2f1982bc2e1..2dd575b95694c126013c912526093ff4915f3398:/lcore.pas?ds=sidebyside diff --git a/lcore.pas b/lcore.pas index 7db6b3e..727ca1c 100755 --- a/lcore.pas +++ b/lcore.pas @@ -405,6 +405,9 @@ end; procedure tlasio.internalclose(error:word); begin if (state<>wsclosed) and (state<>wsinvalidstate) then begin + // -2 is a special indication that we should just exist silently + // (used for connect failure handling when socket creation fails) + if (fdhandlein = -2) and (fdhandleout = -2) then exit; if (fdhandlein < 0) or (fdhandleout < 0) then raise exception.create('internalclose called with invalid fd handles'); eventcore.rmasterclr(fdhandlein);//fd_clr(fdhandlein,fdsrmaster); eventcore.wmasterclr(fdhandleout);//fd_clr(fdhandleout,fdswmaster);