diff --git a/cmd/commandline/commands.go b/cmd/commandline/commands.go index 45d09fd9..cb0f87b3 100644 --- a/cmd/commandline/commands.go +++ b/cmd/commandline/commands.go @@ -749,8 +749,8 @@ func init() { // add contract command // cobra.OnInitialize(initConfig) - helpCmd, _, _ := rootCmd.Find([]string{"help"}) - helpCmd.PersistentPreRun = nil + + // FIXME: add a custom help command or find a way to make help command work without network // Here you will define your flags and configuration settings. // Cobra supports persistent flags, which, if defined here, diff --git a/conn/connection.go b/conn/connection.go index 82595729..e683d722 100644 --- a/conn/connection.go +++ b/conn/connection.go @@ -255,11 +255,14 @@ func (c *Connection) Close() { if c.isHTTP { return } - select { - case c.close <- struct{}{}: - <-c.didClose - case <-c.didClose: - } + hc := c.writeConn.(*channelSession) + hc.Close() + // FIXME: remove substration releated code + // select { + // case c.close <- struct{}{}: + // <-c.didClose + // case <-c.didClose: + // } } // Call performs a JSON-RPC call with the given arguments and unmarshals into