Skip to content

Commit

Permalink
Change thread name
Browse files Browse the repository at this point in the history
  • Loading branch information
marci4 committed Mar 5, 2018
1 parent e5ce217 commit 82be798
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public void connect() {
if( writeThread != null )
throw new IllegalStateException( "WebSocketClient objects are not reuseable" );
writeThread = new Thread( this );
writeThread.setName( "WebSocketWriteThread-" + writeThread.getId() );
writeThread.setName( "WebSocketConnectReadThread-" + writeThread.getId() );
writeThread.start();
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/java_websocket/issues/Issue666Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public void onStart() {
}
for( Thread thread : mapAfter.values() ) {
String name = thread.getName();
if( !name.equals( "WebSocketTimer" ) && !name.startsWith( "WebSocketWriteThread-" ) ) {
if( !name.equals( "WebSocketTimer" ) && !name.startsWith( "WebSocketWriteThread-" ) && !name.startsWith( "WebSocketConnectReadThread-" )) {
Assert.fail( "Thread not correctly named! Is: " + name );
}
}
Expand Down

0 comments on commit 82be798

Please sign in to comment.