{"action":"opened","issue":{"url":"https://api.github.com/repos/jurmous/etcd4j/issues/122","repository_url":"https://api.github.com/repos/jurmous/etcd4j","labels_url":"https://api.github.com/repos/jurmous/etcd4j/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/jurmous/etcd4j/issues/122/comments","events_url":"https://api.github.com/repos/jurmous/etcd4j/issues/122/events","html_url":"https://github.com/jurmous/etcd4j/issues/122","id":177188807,"number":122,"title":"Trying to connect to an invalid socket/port comibnation and  using 'watch' functionality stack overflow","user":{"login":"sheinbergon","id":4031179,"avatar_url":"https://avatars.githubusercontent.com/u/4031179?v=3","gravatar_id":"","url":"https://api.github.com/users/sheinbergon","html_url":"https://github.com/sheinbergon","followers_url":"https://api.github.com/users/sheinbergon/followers","following_url":"https://api.github.com/users/sheinbergon/following{/other_user}","gists_url":"https://api.github.com/users/sheinbergon/gists{/gist_id}","starred_url":"https://api.github.com/users/sheinbergon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheinbergon/subscriptions","organizations_url":"https://api.github.com/users/sheinbergon/orgs","repos_url":"https://api.github.com/users/sheinbergon/repos","events_url":"https://api.github.com/users/sheinbergon/events{/privacy}","received_events_url":"https://api.github.com/users/sheinbergon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-15T14:14:46Z","updated_at":"2016-09-15T14:14:46Z","closed_at":null,"body":"Hi\r\n\r\nDue to a configuration issue back at our we tried to connect to an invalid etcd port and watch a directory.\r\nIn such a scenario , the class ```EtcdResponsePromise```  ```get``` method creates what will eventually become a stack overflow :\r\n\r\n```\r\n  @Override public T get() throws IOException, EtcdException, EtcdAuthenticationException, TimeoutException {\r\n    if (!waitForPromiseSuccess()) {\r\n      return this.get();\r\n    }\r\n\r\n    if (response != null) {\r\n      return response;\r\n    } else {\r\n      if (this.exception instanceof EtcdException) {\r\n        throw (EtcdException) this.exception;\r\n      } if (this.exception instanceof EtcdAuthenticationException) {\r\n        throw (EtcdAuthenticationException) this.exception;\r\n      } else if (this.exception instanceof IOException) {\r\n        throw (IOException) this.exception;\r\n      } else if (this.exception instanceof io.netty.handler.timeout.TimeoutException) {\r\n        throw new TimeoutException();\r\n      } else {\r\n        throw new IOException(this.exception);\r\n      }\r\n    }\r\n  }\r\n\r\n```\r\n\r\nBasically  ```waitForPromiseSuccess``` returns ```false``` and ```get``` is called again .\r\nThe external watchRequest is never notified of error due to the way your underlying code , and were are left with ever increasing stack for the threads in question"}}
{"actor":{"display_login":"sheinbergon"}}