Skip to content

Commit 3648aad

Browse files
authored
Merge pull request #155 from MaryamZi/res-type-fixes
Update active version
2 parents 537f555 + a2729ce commit 3648aad

File tree

5 files changed

+30
-6
lines changed

5 files changed

+30
-6
lines changed

distributor/web/info.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
****** IMPORTANT *******
44
**
5-
** The latest version of the subscriber JAR is subscriber-20200725.jar
5+
** The latest version of the subscriber JAR is subscriber-20200726.jar
66
**
7-
** Available at https://github.com/ECLK/Results-Dist/releases/tag/v2020-07-25
7+
** Available at https://github.com/ECLK/Results-Dist/releases/tag/v2020-07-26
88
**
99
****** IMPORTANT *******
1010

1111
Run it as follows:
1212

13-
java -jar subscriber-20200725.jar [options]
13+
java -jar subscriber-20200726.jar [options]
1414

1515
where options are:
1616
-username=name my username for authentication
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const LEVEL_NF = "NATIONAL-FINAL";
99
const WANT_IMAGE = "image=true";
1010
const WANT_AWAIT_RESULTS = "await=true";
1111

12-
const MY_VERSION = "2020-07-25";
12+
const MY_VERSION = "2020-07-26";
1313

1414
const UNDERSOCRE = "_";
1515
const COLON = ":";

subscriber/src/subscriber/subscriber.bal

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,16 @@ public function main (string? username = (), // my username
129129
headers[http:AUTH_HEADER] = string `Basic ${token}`;
130130
}
131131

132-
http:WebSocketClient wsClientEp = new (wsUrl, config = {callbackService: callbackService, customHeaders: headers});
132+
http:WebSocketClient wsClientEp = new (wsUrl, config = {
133+
callbackService: callbackService,
134+
customHeaders: headers,
135+
retryConfig: {
136+
intervalInMillis: 3000,
137+
maxCount: 10,
138+
backOffFactor: 1.5,
139+
maxWaitIntervalInMillis: 20000
140+
}
141+
});
133142

134143
if wsClientEp.isOpen() {
135144
io:println(
@@ -151,6 +160,10 @@ service resultDataOnlyClientService = @http:WebSocketServiceConfig {} service {
151160
resource function onError(http:WebSocketClient conn, error err) {
152161
log:printError("Error occurred", err);
153162
}
163+
164+
resource function onClose(http:WebSocketClient wsEp, int statusCode, string reason) {
165+
log:printInfo(string `Connection closed: statusCode: ${statusCode}, reason: ${reason}`);
166+
}
154167
};
155168

156169
service awaitAndResultDataClientService = @http:WebSocketServiceConfig {} service {
@@ -174,6 +187,10 @@ service awaitAndResultDataClientService = @http:WebSocketServiceConfig {} servic
174187
resource function onError(http:WebSocketClient conn, error err) {
175188
log:printError("Error occurred", err);
176189
}
190+
191+
resource function onClose(http:WebSocketClient wsEp, int statusCode, string reason) {
192+
log:printInfo(string `Connection closed: statusCode: ${statusCode}, reason: ${reason}`);
193+
}
177194
};
178195

179196
service imageAndResultDataClientService = @http:WebSocketServiceConfig {} service {
@@ -199,6 +216,10 @@ service imageAndResultDataClientService = @http:WebSocketServiceConfig {} servic
199216
resource function onError(http:WebSocketClient conn, error err) {
200217
log:printError("Error occurred", err);
201218
}
219+
220+
resource function onClose(http:WebSocketClient wsEp, int statusCode, string reason) {
221+
log:printInfo(string `Connection closed: statusCode: ${statusCode}, reason: ${reason}`);
222+
}
202223
};
203224

204225

@@ -232,6 +253,10 @@ service allClientService = @http:WebSocketServiceConfig {} service {
232253
resource function onError(http:WebSocketClient conn, error err) {
233254
log:printError("Error occurred", err);
234255
}
256+
257+
resource function onClose(http:WebSocketClient wsEp, int statusCode, string reason) {
258+
log:printInfo(string `Connection closed: statusCode: ${statusCode}, reason: ${reason}`);
259+
}
235260
};
236261

237262
function notifyAwait() {

testdriver/src/testdriver/gen_fake_parliamentary.bal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ function genFakeParliamentary() {
363363
"party_name": "Foo foo",
364364
"candidate_number": "12",
365365
"candidate_name": "Lorem Ipsum"
366-
367366
},
368367
{
369368
"party_code": "Bar",

0 commit comments

Comments
 (0)