- Added select instruction for stopping server more easily
- Added mutex