{"action":"created","issue":{"url":"https://api.github.com/repos/node-red/node-red/issues/759","labels_url":"https://api.github.com/repos/node-red/node-red/issues/759/labels{/name}","comments_url":"https://api.github.com/repos/node-red/node-red/issues/759/comments","events_url":"https://api.github.com/repos/node-red/node-red/issues/759/events","html_url":"https://github.com/node-red/node-red/issues/759","id":118927782,"number":759,"title":"node tcpget can't reconnect","user":{"login":"fab33","id":10790326,"avatar_url":"https://avatars.githubusercontent.com/u/10790326?v=3","gravatar_id":"","url":"https://api.github.com/users/fab33","html_url":"https://github.com/fab33","followers_url":"https://api.github.com/users/fab33/followers","following_url":"https://api.github.com/users/fab33/following{/other_user}","gists_url":"https://api.github.com/users/fab33/gists{/gist_id}","starred_url":"https://api.github.com/users/fab33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fab33/subscriptions","organizations_url":"https://api.github.com/users/fab33/orgs","repos_url":"https://api.github.com/users/fab33/repos","events_url":"https://api.github.com/users/fab33/events{/privacy}","received_events_url":"https://api.github.com/users/fab33/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-11-25T21:35:49Z","updated_at":"2015-12-01T13:56:51Z","closed_at":null,"body":"If I physicaly disconnect my server, after socketTimeout, the timeout event raise and it try to reconnect after 10s (is it normal ?). If it's possible it works. But if connection come back later and you try to connect (by sending a new message), an error raise.\r\nI'm not javascript expert but when you call client.end(), it doesn't raise \"end\" event. So when you hav a timeout, it raise only \"timeout\" and \"error\". But at the end, node.connected is always true !\r\nI don't know if this bug is in others node (tcp-in tcp-out)\r\nI'm patching my node with ugly code (adding node.connected = false in timeout and error event) so I let someone else to provide an \"official\" patch.\r\nIt will be fine to have a timeout event for tcp-in node with a paramter in ms to try to reconnect.\r\nHope you understand my bad english !"},"comment":{"url":"https://api.github.com/repos/node-red/node-red/issues/comments/160976728","html_url":"https://github.com/node-red/node-red/issues/759#issuecomment-160976728","issue_url":"https://api.github.com/repos/node-red/node-red/issues/759","id":160976728,"user":{"login":"dceejay","id":5375409,"avatar_url":"https://avatars.githubusercontent.com/u/5375409?v=3","gravatar_id":"","url":"https://api.github.com/users/dceejay","html_url":"https://github.com/dceejay","followers_url":"https://api.github.com/users/dceejay/followers","following_url":"https://api.github.com/users/dceejay/following{/other_user}","gists_url":"https://api.github.com/users/dceejay/gists{/gist_id}","starred_url":"https://api.github.com/users/dceejay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dceejay/subscriptions","organizations_url":"https://api.github.com/users/dceejay/orgs","repos_url":"https://api.github.com/users/dceejay/repos","events_url":"https://api.github.com/users/dceejay/events{/privacy}","received_events_url":"https://api.github.com/users/dceejay/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T13:56:51Z","updated_at":"2015-12-01T13:56:51Z","body":" I think it's just the way TCP works... it waits for a timeout before it declares the packet lost... \r\nyou can change the timeout in settings.js - default is null - which means do whatever the operating system does."}}