diff --git a/neo-cli/Shell/MainService.cs b/neo-cli/Shell/MainService.cs index 263eadbed..ea9f6f217 100644 --- a/neo-cli/Shell/MainService.cs +++ b/neo-cli/Shell/MainService.cs @@ -1087,6 +1087,7 @@ private static void WriteToPsql(SmartContractEvent contractEvent) try { conn.Open(); + Console.WriteLine(String.Format("Connection state={0}", conn.State)); WriteToEventTable(contractEvent, conn); @@ -1101,11 +1102,13 @@ private static void WriteToPsql(SmartContractEvent contractEvent) } conn.Close(); + Console.WriteLine(String.Format("Connection state={0}", conn.State)); } catch (Exception ex) { if (conn != null && conn.State == System.Data.ConnectionState.Open) { + Console.WriteLine(String.Format("Connection state={0}", conn.State)); conn.Close(); } throw ex;