mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
Fix daemon to unlink the socket on exit with -s
This commit is contained in:
@@ -195,18 +195,15 @@ trylocksock( const char * sockpath )
|
||||
if( NULL == sockpath )
|
||||
{
|
||||
confpath( path, sizeof path, CONF_FILE_SOCKET, 0 );
|
||||
fd = getsock( path );
|
||||
}
|
||||
else
|
||||
{
|
||||
fd = getsock( sockpath );
|
||||
sockpath = path;
|
||||
}
|
||||
fd = getsock( sockpath );
|
||||
if( 0 > fd )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
gl_sockfd = fd;
|
||||
strlcpy( gl_sockpath, path, sizeof gl_sockpath );
|
||||
strlcpy( gl_sockpath, sockpath, sizeof gl_sockpath );
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user