{"action":"created","issue":{"url":"https://api.github.com/repos/cometd/cometd/issues/682","repository_url":"https://api.github.com/repos/cometd/cometd","labels_url":"https://api.github.com/repos/cometd/cometd/issues/682/labels{/name}","comments_url":"https://api.github.com/repos/cometd/cometd/issues/682/comments","events_url":"https://api.github.com/repos/cometd/cometd/issues/682/events","html_url":"https://github.com/cometd/cometd/issues/682","id":184415058,"number":682,"title":"Warning during Tomcat shutdown","user":{"login":"boris-petrov","id":278940,"avatar_url":"https://avatars.githubusercontent.com/u/278940?v=3","gravatar_id":"","url":"https://api.github.com/users/boris-petrov","html_url":"https://github.com/boris-petrov","followers_url":"https://api.github.com/users/boris-petrov/followers","following_url":"https://api.github.com/users/boris-petrov/following{/other_user}","gists_url":"https://api.github.com/users/boris-petrov/gists{/gist_id}","starred_url":"https://api.github.com/users/boris-petrov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boris-petrov/subscriptions","organizations_url":"https://api.github.com/users/boris-petrov/orgs","repos_url":"https://api.github.com/users/boris-petrov/repos","events_url":"https://api.github.com/users/boris-petrov/events{/privacy}","received_events_url":"https://api.github.com/users/boris-petrov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cometd/cometd/labels/bug","name":"bug","color":"b60205"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-10-21T07:14:39Z","updated_at":"2016-10-21T10:40:15Z","closed_at":"2016-10-21T08:56:54Z","body":"I have an application which uses CometD and runs in Tomcat 8. When the server is shutting down, the following warning appears:\r\n\r\n`\r\nSEVERE [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [myapp] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6cf7047e]) and a value of type [org.cometd.websocket.server.WebSocketTransport.ContextHolder] (value org.cometd.websocket.server.WebSocketTransport$ContextHolder@17eed49f]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.\r\n`\r\n\r\nI guess it is because of [this](https://github.com/cometd/cometd/blob/c20b75f79d18ff149404b2f2502c9fb0a805b0b6/cometd-java/cometd-java-websocket/cometd-java-websocket-javax-server/src/main/java/org/cometd/websocket/server/WebSocketTransport.java#L284) not being removed.\r\n"},"comment":{"url":"https://api.github.com/repos/cometd/cometd/issues/comments/255349975","html_url":"https://github.com/cometd/cometd/issues/682#issuecomment-255349975","issue_url":"https://api.github.com/repos/cometd/cometd/issues/682","id":255349975,"user":{"login":"boris-petrov","id":278940,"avatar_url":"https://avatars.githubusercontent.com/u/278940?v=3","gravatar_id":"","url":"https://api.github.com/users/boris-petrov","html_url":"https://github.com/boris-petrov","followers_url":"https://api.github.com/users/boris-petrov/followers","following_url":"https://api.github.com/users/boris-petrov/following{/other_user}","gists_url":"https://api.github.com/users/boris-petrov/gists{/gist_id}","starred_url":"https://api.github.com/users/boris-petrov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boris-petrov/subscriptions","organizations_url":"https://api.github.com/users/boris-petrov/orgs","repos_url":"https://api.github.com/users/boris-petrov/repos","events_url":"https://api.github.com/users/boris-petrov/events{/privacy}","received_events_url":"https://api.github.com/users/boris-petrov/received_events","type":"User","site_admin":false},"created_at":"2016-10-21T10:40:15Z","updated_at":"2016-10-21T10:40:15Z","body":"I cannot get my application to work fine with the code from the `3.0.x` branch. I am getting a `Error during WebSocket handshake: Unexpected response code: 200` but as I said, probably I'm doing something wrong. The error doesn't appear in the log when I stop the server, however it might be because no client is ever connected to it."}}
{"actor":{"display_login":"boris-petrov"}}