Added automatic reconnect to proxy when necessary
Shortened IdleTimeout for client
Merged from master