chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] zmq, problems with using several sockets, closing so


From: .alyn.post.
Subject: Re: [Chicken-users] zmq, problems with using several sockets, closing sockets
Date: Tue, 6 Nov 2012 08:16:40 -0701

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]