Use connectionUtils.isClosed in won-message-utils
@@ -11,6 +11,7 @@ import urljoin from "url-join";
import { getRandomWonId } from "./won-utils.js";
import * as useCaseUtils from "./usecase-utils.js";
+import * as connectionUtils from "./connection-utils.js";
import { actionTypes } from "./actions/actions.js";
/**
@@ -851,7 +852,7 @@ function fetchConnectionsOfAtomAndDispatch(atomUri, dispatch) {
});
const activeConnectionUris = connectionsWithStateAndSocket
- .filter(conn => conn.connectionState !== won.WON.Closed)
+ .filter(conn => !connectionUtils.isClosed(conn))
.map(conn => conn.connectionUri);
dispatch({
