| Index: samples/chat/chat_server_lib.dart
|
| diff --git a/samples/chat/chat_server_lib.dart b/samples/chat/chat_server_lib.dart
|
| index 8103c9c46df9d70518836d9fc254b5847d4b5872..134ed58a5eaa6efc02d1d691f0aa1c47be71a6ed 100644
|
| --- a/samples/chat/chat_server_lib.dart
|
| +++ b/samples/chat/chat_server_lib.dart
|
| @@ -6,6 +6,7 @@
|
| #import("dart:io");
|
| #import("dart:isolate");
|
| #import("dart:json");
|
| +#import("dart:math");
|
|
|
| void startChatServer() {
|
| var server = new ChatServer();
|
| @@ -57,7 +58,8 @@ class ServerMain {
|
| class User {
|
| User(this._handle) {
|
| // TODO(sgjesse) Generate more secure and unique session id's.
|
| - _sessionId = "a${(Math.random() * 1000000).toInt()}";
|
| + var rand = new Random();
|
| + _sessionId = "a${rand.nextInt(1000000)}";
|
| markActivity();
|
| }
|
|
|
|
|