mirror of
https://github.com/postmannen/ctrl.git
synced 2024-12-14 12:37:31 +00:00
Only keep last hello from node in data folder
This commit is contained in:
parent
c4aa08711a
commit
fe6af5c841
1 changed files with 2 additions and 1 deletions
|
@ -953,7 +953,8 @@ func (m methodREQHello) handler(proc process, message Message, node string) ([]b
|
|||
|
||||
// Open file and write data.
|
||||
file := filepath.Join(folderTree, fileName)
|
||||
f, err := os.OpenFile(file, os.O_APPEND|os.O_RDWR|os.O_CREATE|os.O_SYNC, 0600)
|
||||
//f, err := os.OpenFile(file, os.O_APPEND|os.O_RDWR|os.O_CREATE|os.O_SYNC, 0600)
|
||||
f, err := os.OpenFile(file, os.O_TRUNC|os.O_RDWR|os.O_CREATE|os.O_SYNC, 0600)
|
||||
|
||||
if err != nil {
|
||||
log.Printf("error: methodREQHello.handler: failed to open file: %v\n", err)
|
||||
|
|
Loading…
Reference in a new issue