Project

General

Profile

Task #1367

Updated by Junxiao Shi over 10 years ago

Currently, NFD checks if the unix socket file exists and if so simply deletes the file.    This causes problems when NFD is run twice (i.e., the second attempt will fail because it will not be able to bind to tcp/udp socket, but will disable any future communication via unix socket). 

 This task is to change this behavior.    Instead of just deleting existing file, the initialization procedure should: 

 1. if UNIX socket doesn’t exist, goto step 4 
 2. should attempt to connect to the UNIX socket, socket if the file exists.    If the connection succeeds (indicating another process is listening on fails, then proceed with deletion and creation of the same socket), raise an socket.    However, if connection succeeds, the initialization should throw error and abort these steps 
 3. delete the UNIX socket 
 4. start listening 
 any further actions.

Back