Disconnecting database after writing to the branch database caused problems. To prevent this, we are just reloading the hub database instead of relying on the restart.
put a require into close.
Merge branch 'master' of github.com:AppStateESS/phpwebsite