client: use PID as a client ID (#550)

Fixes: #549
This commit is contained in:
Eduard Ganiukov authored and GitHub committed 2021-01-03 01:58:01 +03:00
1 parent 42eb27823e
commit d62dd9353f
1 file changed
+1 -6
+1 -6
View File
@@ -242,13 +242,8 @@ func main() {
default:
checkServer()
gClientID = 1000
gClientID = os.Getpid()
gLogPath = filepath.Join(os.TempDir(), fmt.Sprintf("lf.%s.%d.log", gUser.Username, gClientID))
for _, err := os.Stat(gLogPath); !os.IsNotExist(err); _, err = os.Stat(gLogPath) {
gClientID++
gLogPath = filepath.Join(os.TempDir(), fmt.Sprintf("lf.%s.%d.log", gUser.Username, gClientID))
}
switch flag.NArg() {
case 0:
_, err := os.Getwd()