Improve handling of lost connections
Fix an issue refreshing functions in PPAS packages