efl_net_socket_fd: do not close stdout if nothing was set.
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Thu, 8 Dec 2016 20:54:43 +0000 (18:54 -0200)
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Fri, 9 Dec 2016 15:47:03 +0000 (13:47 -0200)
commit3fc0fbba42eaf331f69dbad0c507c1bf3d0cfc94
tree611c0947338f7dcf8a4de253bba33969608016ac
parentcfc21c16fb0151bafea41f68a9f4a95248018408
efl_net_socket_fd: do not close stdout if nothing was set.

if we create an object, say a TCP dialer, and don't connect/bind, then
we have no FD (=0). If we set FD to INVALID_SOCKET on start, other
parts of the code will fail since they consider that "closed", but
we're not closed yet.

Then check for family == AF_UNSPEC && fd == 0, if so don't close it.
src/lib/ecore_con/efl_net_socket_fd.c