fix several issues + add priority for server watchers
optimize wakeup_clients logic