mutex for shutdown/handhsake