Skip to content

Commit 60233d3

Browse files
jgautierTooTallNate
authored andcommitted
1 parent a4da4e4 commit 60233d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/net/tootallnate/websocket/WebSocketClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ private String generateKey() {
255255
}
256256
long product = number * spaces;
257257
String key = Long.toString(product);
258-
int numChars = r.nextInt(12);
258+
//always insert atleast one random character
259+
int numChars = r.nextInt(12)+1;
259260
for (int i=0; i < numChars; i++){
260261
int position = r.nextInt(key.length());
261262
position = Math.abs(position);

0 commit comments

Comments
 (0)