summary refs log tree commit diff
path: root/synapse_topology/webui
diff options
context:
space:
mode:
authorJorik Schellekens <joriks@matrix.org>2019-09-05 11:48:07 +0100
committerJorik Schellekens <joriks@matrix.org>2019-09-05 11:48:23 +0100
commitd934837b48fd493d85f96c10adb69cdf8f4badb7 (patch)
tree0bfe4bbdc6a2ef4b58e3bbacce18b20561a5f7b2 /synapse_topology/webui
parentPriv ports not working (diff)
downloadsynapse-d934837b48fd493d85f96c10adb69cdf8f4badb7.tar.xz
Fix port in use
Diffstat (limited to 'synapse_topology/webui')
-rw-r--r--synapse_topology/webui/src/js/components/PortSelection.jsx9
1 files changed, 2 insertions, 7 deletions
diff --git a/synapse_topology/webui/src/js/components/PortSelection.jsx b/synapse_topology/webui/src/js/components/PortSelection.jsx
index c795c5d2db..a2ac1316c6 100644
--- a/synapse_topology/webui/src/js/components/PortSelection.jsx
+++ b/synapse_topology/webui/src/js/components/PortSelection.jsx
@@ -35,8 +35,6 @@ export default ({
     const [clientPortValid, setClientPortValid] = useState(true)
     const [fedPortValid, setFedPortValid] = useState(true)
 
-    const [internalFedPortInUse, setInternalFedPortInUse] = useState(fedPortInUse)
-    const [internalClientPortInUse, setInternalClientPortInUse] = useState(clientPortInUse)
 
     const updateValidity = (port, setValid) => setValid(
         !isNaN(port) && 0 < port && port <= 65535,
@@ -46,7 +44,6 @@ export default ({
     const onFederationChange = event => {
 
         const val = event.target.value ? event.target.value : defaultFedPort;
-        setInternalFedPortInUse(false);
         setFedPort(val);
         updateValidity(val, setFedPortValid);
 
@@ -55,7 +52,6 @@ export default ({
     const onClientChange = event => {
 
         const val = event.target.value ? event.target.value : defaultClientPort;
-        setInternalClientPortInUse(false);
         setClientPort(val);
         updateValidity(val, setClientPortValid);
 
@@ -63,12 +59,12 @@ export default ({
 
     const toggle = useAccordionToggle(nextUI(PORT_SELECTION_UI));
 
-    const fedPortError = internalFedPortInUse ?
+    const fedPortError = fedPortInUse ?
         "This port is in use" :
         !fedPortValid ? "Invalid port" :
             undefined;
 
-    const clientPortError = internalClientPortInUse ?
+    const clientPortError = clientPortInUse ?
         "This port is in use" :
         !clientPortValid ? "Invalid port" :
             undefined;
@@ -124,7 +120,6 @@ export default ({
                 <InlineError error={clientPortError}>
                     <input
                         type="text"
-                        className={internalClientPortInUse | !clientPortValid ? "invalid" : undefined}
                         onChange={onClientChange}
                         disabled={canChangePorts ? undefined : true}
                         autoFocus