     # whether to connect is dictated by the client.
     ipc.on 'hangupsConnect', ->
         console.log 'hconnect'
-        # first connect
         reconnect()
-        .then ->
-            console.log 'connected', reconnectCount
-            # on first connect, send init, after that only resync
-            if reconnectCount == 0
-                sendInit()
-            else
-                syncrecent()
-            reconnectCount++
-        .catch (e) -> console.log 'error connecting', e
-
 
     ipc.on 'hangupsDisconnect', ->
         console.log 'hdisconnect'

           {url:'https://plus.google.com', env:'HTTPS_PROXY'}
        ]
        Q.all todo.map (t) -> Q.Promise (rs) ->
            session = require('electron').session
            session.defaultSession.resolveProxy t.url, (proxyURL) ->
                # Format of proxyURL is either "DIRECT" or "PROXY 127.0.0.1:8888"
                [_, purl] = proxyURL.split ' '
                process.env[t.env] ?= if purl then "http://#{purl}" else ""

tmp       = require 'tmp'
clipboard = require('electron').clipboard
Menu      = require('electron').menu
session = require('electron').session

tmp.setGracefulCleanup()

