Skip to content

Commit

Permalink
fixed issue #11
Browse files Browse the repository at this point in the history
  • Loading branch information
isapir committed Sep 23, 2017
1 parent 98434e8 commit b45cc44
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
18 changes: 16 additions & 2 deletions lucee-websocket.iml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,21 @@
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-websocket:8.5.12" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.12" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-util:8.5.12" level="project" />
<orderEntry type="module" module-name="loader" />
<orderEntry type="module" module-name="lucee-apps" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jsp-api:8.5.20" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-el-api:8.5.20" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-servlet-api:8.5.20" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.tomcat:tomcat-websocket-api:8.5.20" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-websocket:8.5.20" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.20" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-util:8.5.20" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.lucee:lucee:5.1.4.19" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.felix:org.apache.felix.framework:4.6.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet.jsp:jsp-api:2.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.el:javax.el-api:3.0.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.ant:ant:1.9.5" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.ant:ant-launcher:1.9.5" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: net.twentyonesolutions:lucee-apps:2.0.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet.jsp:javax.servlet.jsp-api:2.3.1" level="project" />
</component>
</module>
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>net.twentyonesolutions</groupId>
<artifactId>lucee-websocket</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>

<name>Lucee WebSocket</name>
<description>Enables server WebSockets for Lucee via JSR-356 compliant servlet containers (e.g. Tomcat 8, Jetty 9.1, etc.)</description>
Expand Down Expand Up @@ -37,7 +37,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

<tomcat.version>8.5.16</tomcat.version>
<tomcat.version>8.5.20</tomcat.version>
</properties>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.net.URI;
import java.nio.ByteBuffer;
import java.security.Principal;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -453,7 +454,19 @@ public void log(int logLevel, String message) {
*/
public Set<String> getChannels() {

return (Set) wsSession.getUserProperties().get(PROPERTY_CHANNELS);
if (wsSession.isOpen()){

try {

return (Set) wsSession.getUserProperties().get(PROPERTY_CHANNELS);
}
catch (IllegalStateException ise){

this.getConnectionManager().log(Log.LEVEL_DEBUG, this.getId() + ": " + ise.getMessage());
}
}

return Collections.EMPTY_SET;
}

public int subscribe(String channelId) {
Expand Down

0 comments on commit b45cc44

Please sign in to comment.