New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
keystore watcher not release #45
Comments
did u solve problem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I init in a injector method ensure grpc client init one time,such as:
`func InitTronGRpc() (*client.GrpcClient, func(), error) {
cfg := config.C.TronGrid
opts := make([]grpc.DialOption, 0)
opts = append(opts, grpc.WithInsecure())
}
`
and I call UnlockedKeystore in a service ,
I found
UnlockedKeystore
not release watcher goroutine, cause memory is fullfunc (tron *TronOperator) SignatureExecuteTx(ctx context.Context, tx *api.TransactionExtention, err error) (string, error) { ks, acct, _ := store.UnlockedKeystore(config.C.TronGrid.OperatorAddress, config.C.TronGrid.OperatorPassword) ctrlr := transaction.NewController(tron.TronGrpc, ks, acct, tx.Transaction) if err = ctrlr.ExecuteTransaction(); err != nil { return "", err } txId := utils.BytesToNo0xHexString(tx.GetTxid()) return txId, err }
all goroutine keep in memory, like this
How to solve ?
Thanks!
The text was updated successfully, but these errors were encountered: