mirror of
https://github.com/transmission/transmission
synced 2024-12-24 00:34:04 +00:00
Fix daemon to unlink the socket on exit with -s
This commit is contained in:
parent
1636fc70d2
commit
33ade6978b
1 changed files with 3 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue