{"action":"created","issue":{"url":"https://api.github.com/repos/StreamBoat/kodi_jsonrpc/issues/1","labels_url":"https://api.github.com/repos/StreamBoat/kodi_jsonrpc/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/StreamBoat/kodi_jsonrpc/issues/1/comments","events_url":"https://api.github.com/repos/StreamBoat/kodi_jsonrpc/issues/1/events","html_url":"https://github.com/StreamBoat/kodi_jsonrpc/issues/1","id":72423744,"number":1,"title":"Couldn't connect to Kodi","user":{"login":"acasanova","id":2922800,"avatar_url":"https://avatars.githubusercontent.com/u/2922800?v=3","gravatar_id":"","url":"https://api.github.com/users/acasanova","html_url":"https://github.com/acasanova","followers_url":"https://api.github.com/users/acasanova/followers","following_url":"https://api.github.com/users/acasanova/following{/other_user}","gists_url":"https://api.github.com/users/acasanova/gists{/gist_id}","starred_url":"https://api.github.com/users/acasanova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acasanova/subscriptions","organizations_url":"https://api.github.com/users/acasanova/orgs","repos_url":"https://api.github.com/users/acasanova/repos","events_url":"https://api.github.com/users/acasanova/events{/privacy}","received_events_url":"https://api.github.com/users/acasanova/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-01T12:29:03Z","updated_at":"2015-05-01T15:05:04Z","closed_at":"2015-05-01T15:05:04Z","body":"Hi, I'm trying to use your library to connect to a running instance of kodi on Macosx Mavericks.  \r\n\r\nMy kodi webserver config looks like the following\r\n![image](https://cloud.githubusercontent.com/assets/2922800/7429990/e517068e-efd9-11e4-8a56-ec04aed1f601.png)\r\n\r\n\r\n````\r\npackage main\r\n\r\nimport (\r\n\t\"fmt\"\r\n\tkodij \"github.com/StreamBoat/kodi_jsonrpc\"\r\n)\r\n\r\nfunc main() {\r\n\tkodi, err := kodij.New(`localhost:8097`, 15) // timeout after 15 secs\r\n\tdefer kodi.Close()                           // always close to free resources\r\n\r\n\tif err != nil {\r\n\t\tpanic(fmt.Sprintf(`Couldn't connect to Kodi: %v`, err))\r\n\t}\r\n\r\n\trequest := kodij.Request{Method: `JSONRPC.Version`}\r\n\tresponse, _ := kodi.Send(request, true) // second param says we need a response\r\n\r\n\t// wait indefinitely for response (timeout 0)\r\n\tresult, err := response.Read(0)\r\n\r\n\tif err != nil {\r\n\t\tpanic(fmt.Sprintf(`Kodi responded with error: %v`, err))\r\n\t}\r\n\r\n\tfmt.Println(result)\r\n\r\n\t// Output:\r\n\t// map[version:map[major:6 minor:14 patch:3]]\r\n}\r\n````\r\n\r\n````\r\nINFO[0000] Connected to Kodi\r\nERRO[0015] Kodi responded                                error=Timeout waiting on response channel\r\nINFO[0015] Disconnected from Kodi\r\npanic: Couldn't connect to Kodi: Timeout waiting on response channel\r\n\r\ngoroutine 1 [running]:\r\nmain.main()\r\n\t/Users/acasanova/projects/go/src/gregbox/test/main.go:13 +0x226\r\n\r\ngoroutine 17 [syscall, locked to thread]:\r\nruntime.goexit()\r\n\t/usr/local/Cellar/go/1.4.2/libexec/src/runtime/asm_amd64.s:2232 +0x1\r\n\r\ngoroutine 5 [runnable]:\r\nnet.(*pollDesc).Wait(0xc2080100d0, 0x72, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:84 +0x47\r\nnet.(*pollDesc).WaitRead(0xc2080100d0, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:89 +0x43\r\nnet.(*netFD).Read(0xc208010070, 0xc20807c000, 0x200, 0x200, 0x0, 0x4119c8, 0xc20800a4d8)\r\n\t/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_unix.go:242 +0x40f\r\nnet.(*conn).Read(0xc208038020, 0xc20807c000, 0x200, 0x200, 0x0, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.4.2/libexec/src/net/net.go:121 +0xdc\r\nencoding/json.(*Decoder).readValue(0xc208076000, 0xc207ffcbbb, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.4.2/libexec/src/encoding/json/stream.go:124 +0x5e1\r\nencoding/json.(*Decoder).Decode(0xc208076000, 0x164420, 0xc208034440, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.4.2/libexec/src/encoding/json/stream.go:44 +0x7b\r\ngithub.com/StreamBoat/kodi_jsonrpc.(*Connection).reader(0xc20805c0b0)\r\n\t/Users/acasanova/projects/go/src/github.com/StreamBoat/kodi_jsonrpc/kodi_jsonrpc.go:337 +0x6c\r\ncreated by github.com/StreamBoat/kodi_jsonrpc.(*Connection).init\r\n\t/Users/acasanova/projects/go/src/github.com/StreamBoat/kodi_jsonrpc/kodi_jsonrpc.go:199 +0x1d5\r\n\r\ngoroutine 6 [runnable]:\r\ngithub.com/StreamBoat/kodi_jsonrpc.(*Connection).writer(0xc20805c0b0)\r\n\t/Users/acasanova/projects/go/src/github.com/StreamBoat/kodi_jsonrpc/kodi_jsonrpc.go:324 +0x7a\r\ncreated by github.com/StreamBoat/kodi_jsonrpc.(*Connection).init\r\n\t/Users/acasanova/projects/go/src/github.com/StreamBoat/kodi_jsonrpc/kodi_jsonrpc.go:200 +0x1f2\r\nexit status 2\r\n````\r\n\r\nIf I go to http://localhost:8097/jsonrpcit loads the documentation and so on I tried some of the json rpc examples ( http://kodi.wiki/view/JSON-RPC_API/Examples ) and they seemed to work fine.\r\nCould you provide any pointers on why this might be happening?"},"comment":{"url":"https://api.github.com/repos/StreamBoat/kodi_jsonrpc/issues/comments/98150997","html_url":"https://github.com/StreamBoat/kodi_jsonrpc/issues/1#issuecomment-98150997","issue_url":"https://api.github.com/repos/StreamBoat/kodi_jsonrpc/issues/1","id":98150997,"user":{"login":"acasanova","id":2922800,"avatar_url":"https://avatars.githubusercontent.com/u/2922800?v=3","gravatar_id":"","url":"https://api.github.com/users/acasanova","html_url":"https://github.com/acasanova","followers_url":"https://api.github.com/users/acasanova/followers","following_url":"https://api.github.com/users/acasanova/following{/other_user}","gists_url":"https://api.github.com/users/acasanova/gists{/gist_id}","starred_url":"https://api.github.com/users/acasanova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acasanova/subscriptions","organizations_url":"https://api.github.com/users/acasanova/orgs","repos_url":"https://api.github.com/users/acasanova/repos","events_url":"https://api.github.com/users/acasanova/events{/privacy}","received_events_url":"https://api.github.com/users/acasanova/received_events","type":"User","site_admin":false},"created_at":"2015-05-01T15:05:04Z","updated_at":"2015-05-01T15:05:04Z","body":"ok i turned off the webserver and it connected. Thanks"}}