{"action":"opened","issue":{"url":"https://api.github.com/repos/ditesh/node-poplib/issues/20","labels_url":"https://api.github.com/repos/ditesh/node-poplib/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/ditesh/node-poplib/issues/20/comments","events_url":"https://api.github.com/repos/ditesh/node-poplib/issues/20/events","html_url":"https://github.com/ditesh/node-poplib/issues/20","id":58557293,"number":20,"title":"Unhandled Exception When the listening server is an IMAP server","user":{"login":"khalilTN","id":9549132,"avatar_url":"https://avatars.githubusercontent.com/u/9549132?v=3","gravatar_id":"","url":"https://api.github.com/users/khalilTN","html_url":"https://github.com/khalilTN","followers_url":"https://api.github.com/users/khalilTN/followers","following_url":"https://api.github.com/users/khalilTN/following{/other_user}","gists_url":"https://api.github.com/users/khalilTN/gists{/gist_id}","starred_url":"https://api.github.com/users/khalilTN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khalilTN/subscriptions","organizations_url":"https://api.github.com/users/khalilTN/orgs","repos_url":"https://api.github.com/users/khalilTN/repos","events_url":"https://api.github.com/users/khalilTN/events{/privacy}","received_events_url":"https://api.github.com/users/khalilTN/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-23T08:38:55Z","updated_at":"2015-02-23T08:38:55Z","closed_at":null,"body":"I'm developing an adapter for emails independent from protocol,\r\nAs mistake, i tried to connect pop3 client to an IMAP server, the connection is established and then when executing stls(), and exception occurs.\r\nMy problem is that i can't handle this exception as it does not arrive to my app layer.\r\nA simple try catch cant solve the problem.\r\n````\r\nevents.js:72\r\n\r\nthrow er; // Unhandled 'error' event\r\n              ^\r\nError: 139645880629312:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:766:\r\n\r\n    at SlabBuffer.use (tls.js:234:18)\r\n    at CleartextStream.read [as _read] (tls.js:454:29)\r\n    at CleartextStream.Readable.read (_stream_readable.js:340:10)\r\n    at EncryptedStream.write [as _write] (tls.js:368:25)\r\n    at doWrite (_stream_writable.js:225:10)\r\n    at writeOrBuffer (_stream_writable.js:215:5)\r\n    at EncryptedStream.Writable.write (_stream_writable.js:182:11)\r\n    at Socket.ondata (stream.js:51:26)\r\n    at Socket.emit (events.js:95:17)\r\n    at Socket.<anonymous> (_stream_readable.js:764:14)\r\n````\r\n"}}