Add flags option when add watcher.
Remove socket when client disconnected.