[DGD] dgd, comm.c: 850: Why is this a fatal error?

Felix A. Croes felix at dworkin.nl
Tue Nov 12 10:19:48 CET 2013


Raymond Jennings <shentino at gmail.com> wrote:

> I'm just curious, why is this a fatal error?  Looking at the docs it would
> seem that a failure to connect would rather result in a close() or an
> unconnected() call.

When you read the code of conn_connect(), you'll see that the function
does not return NULL when it cannot establish a connection, but rather
when there is an internal consistency problem in DGD or it cannot use
operating system calls as expected.  An actual failure to establish a
connection should not occur in this function because the socket is
non-blocking.

Regards,
Felix Croes



More information about the DGD mailing list