jsonrpc-server: make setting mt->select into its own functions