On Tue, Nov 06, 2012 at 06:48:33AM -0700, matt welland wrote: > > I guess this could be considered a bug: The finalizer unconditionally > > closes the socket which seems to lead to this error when it was > > explicitly closed before. Skimming the API reference I don't see a way > > to check whether a socket is already closed. Do you know of any? Or do > > you have a better idea how to handle this situation? > > I also could not find a way to check that a socket was already closed. > As a last resort perhaps add a flag to disable finalizers? >
Can you call getsockopt with the SO_TYPE flag and check for EBADF and ENOTSOCK? That is essentially why the finalizer is 'failing' anyway... -Alan -- .i ma'a lo bradi cu penmi gi'e du _______________________________________________ Chicken-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-users
