ecore_con - on bsd if we get flock unlink old socket by force
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sat, 15 Feb 2020 11:31:43 +0000 (11:31 +0000)
committerJongmin Lee <jm105.lee@samsung.com>
Mon, 17 Feb 2020 21:39:19 +0000 (06:39 +0900)
trying to address other parts of the bsd socket hanging on bind() etc.
... unlink socket if we get the file lock as we should now have an
exclusive lock on the socket anyway - clear out the old one by force
once we have the lock.

src/lib/ecore_con/efl_net_server_unix.c

index a94c880e1dbb5a3df4fdb855f956af95a369568f..776f6a2f206b90e6fe155237ed154d1dae1633f1 100644 (file)
@@ -206,6 +206,7 @@ _efl_net_server_unix_bind(Eo *o, Efl_Net_Server_Unix_Data *pd)
              err = EADDRINUSE;
              goto error;
           }
+        unlink(addr.sun_path);
         pd->have_lock_fd = EINA_TRUE;
 #endif
         r = bind(fd, (struct sockaddr *)&addr, addrlen);