server: wrap code in lock
1.8.7