Skip to content

Commit

Permalink
Merge pull request #61 from joeytang/master
Browse files Browse the repository at this point in the history
add log
  • Loading branch information
kylin2017 authored Aug 15, 2019
2 parents c8c1c39 + 60df851 commit d158261
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions util/service/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,19 +178,19 @@ func (m *ClientThrift) newClient(addr string) rpcClient {

transport, err := thrift.NewTSocket(addr)
if err != nil {
slog.Errorf("%s NetTSocket addr:%s err:%s", fun, addr, err)
slog.Errorf("%s NetTSocket addr:%s serv:%s err:%s", fun, addr, m.clientLookup.ServKey(), err)
return nil
}
useTransport := transportFactory.GetTransport(transport)

if err := useTransport.Open(); err != nil {
slog.Errorf("%s Open addr:%s err:%s", fun, addr, err)
slog.Errorf("%s Open addr:%s serv:%s err:%s", fun, addr, m.clientLookup.ServKey(), err)
return nil
}
// 必须要close么?
//useTransport.Close()

slog.Infof("%s new client addr:%s", fun, addr)
slog.Infof("%s new client addr:%s serv:%s", fun, addr, m.clientLookup.ServKey())
return &rpcClient1{
tsock: transport,
trans: useTransport,
Expand Down

0 comments on commit d158261

Please sign in to comment.