Skip to content

Commit e2a017f

Browse files
committed
minor gui improvement of the stress test tool
1 parent 575b29e commit e2a017f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

example/ServerStressTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ public void actionPerformed( ActionEvent e ) {
9292
while ( !websockets.isEmpty() )
9393
websockets.remove( 0 ).close();
9494

95-
9695
}
9796
} );
9897
joinrate = new JSlider( 0, 5000 );
@@ -160,6 +159,7 @@ public void adjust() throws InterruptedException {
160159
@Override
161160
public void onClose( int code, String reason, boolean remote ) {
162161
System.out.println( "Closed duo " + code + " " + reason );
162+
clients.setValue( websockets.size() );
163163
websockets.remove( this );
164164
}
165165
};
@@ -174,11 +174,9 @@ public void onClose( int code, String reason, boolean remote ) {
174174
}
175175
timer = new Timer( true );
176176
timer.scheduleAtFixedRate( new TimerTask() {
177-
178177
@Override
179178
public void run() {
180179
send();
181-
182180
}
183181
}, 0, interval.getValue() );
184182

@@ -203,7 +201,7 @@ public void send() {
203201
try {
204202
cl.send( payload );
205203
cl.flush();
206-
} catch ( NotYetConnectedException e )
204+
} catch ( NotYetConnectedException e ) {
207205
notyetconnected++;
208206
} catch ( InterruptedException e ) {
209207
e.printStackTrace();

0 commit comments

Comments
 (0)