• R/O
  • HTTP
  • SSH
  • HTTPS

vapor: Commit

Golang implemented sidechain for Bytom


Commit MetaInfo

Revision8f3497631ce7cf7ae1e03200a9be9adecf4a9e57 (tree)
Time2019-08-13 16:21:48
AuthorwyjDoraemon <wyjDoraemon@163....>
CommiterwyjDoraemon

Log Message

writer close

Change Summary

Incremental Difference

--- a/log/log.go
+++ b/log/log.go
@@ -68,15 +68,17 @@ func (hook *BtmHook) ioWrite(entry *logrus.Entry) error {
6868 return err
6969 }
7070
71- _, err = writer.Write(msg)
72- return err
71+ if _, err := writer.Write(msg); err != nil {
72+ return err
73+ }
74+ return writer.Close()
7375 }
7476
7577 func clearLockFiles(logPath string) error {
7678 files, err := ioutil.ReadDir(logPath)
7779 if os.IsNotExist(err) {
7880 return nil
79- }else if err != nil {
81+ } else if err != nil {
8082 return err
8183 }
8284
--- a/p2p/security/security.go
+++ b/p2p/security/security.go
@@ -6,7 +6,7 @@ import (
66 cfg "github.com/vapor/config"
77 )
88
9-const logModule = "p2p/security"
9+const logModule = "p2pSecurity"
1010
1111 type Security struct {
1212 filter *PeerFilter
Show on old repository browser