drachtio-srf 4.5.21 → 4.5.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +5 -7
- package/.github/workflows/publish.yml +3 -3
- package/lib/drachtio-agent.js +4 -0
- package/lib/srf.js +1 -1
- package/package.json +6 -6
package/.github/workflows/ci.yml
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
name: CI
|
|
2
2
|
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
workflow_dispatch:
|
|
3
|
+
on: [push, pull_request]
|
|
6
4
|
|
|
7
5
|
jobs:
|
|
8
6
|
build:
|
|
9
7
|
runs-on: ubuntu-latest
|
|
10
8
|
steps:
|
|
11
|
-
- uses: actions/checkout@
|
|
12
|
-
- uses: actions/setup-node@
|
|
9
|
+
- uses: actions/checkout@v3
|
|
10
|
+
- uses: actions/setup-node@v3
|
|
13
11
|
with:
|
|
14
|
-
node-version:
|
|
12
|
+
node-version: lts/*
|
|
15
13
|
- run: npm install
|
|
16
|
-
|
|
14
|
+
- run: npm run jslint
|
|
17
15
|
- run: npm test
|
|
18
16
|
|
|
19
17
|
|
|
@@ -12,10 +12,10 @@ jobs:
|
|
|
12
12
|
runs-on: ubuntu-latest
|
|
13
13
|
|
|
14
14
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
16
|
-
- uses: actions/setup-node@
|
|
15
|
+
- uses: actions/checkout@v3
|
|
16
|
+
- uses: actions/setup-node@v3
|
|
17
17
|
with:
|
|
18
|
-
node-version:
|
|
18
|
+
node-version: lts/*
|
|
19
19
|
registry-url: 'https://registry.npmjs.org'
|
|
20
20
|
- run: npm install
|
|
21
21
|
- run: npm publish --access public
|
package/lib/drachtio-agent.js
CHANGED
|
@@ -336,6 +336,10 @@ class DrachtioAgent extends Emitter {
|
|
|
336
336
|
sendResponse(res, opts, callback, fnAck) {
|
|
337
337
|
const obj = this.mapServer.get(res.socket) ;
|
|
338
338
|
debug(`agent#sendResponse: ${JSON.stringify(res.msg)}`);
|
|
339
|
+
if (!obj) {
|
|
340
|
+
callback && callback(new Error('drachtio-agent:sendResponse: socket connection closed'));
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
339
343
|
const msgId = this.sendMessage(res.socket, res.msg, Object.assign({stackTxnId: res.req.stackTxnId}, opts)) ;
|
|
340
344
|
if ((callback && typeof callback === 'function') || fnAck) {
|
|
341
345
|
|
package/lib/srf.js
CHANGED
|
@@ -1028,7 +1028,7 @@ class Srf extends Emitter {
|
|
|
1028
1028
|
return callback(null, {uac, uas}); // successfully connected! resolve promise with both dialogs
|
|
1029
1029
|
} catch (err) {
|
|
1030
1030
|
debug({err}, 'createB2BUA: failed creating UAS..done!');
|
|
1031
|
-
uac && uac.destroy() ;
|
|
1031
|
+
uac && uac.destroy().catch(() => {}) ; // failed A leg after success on B: tear down B
|
|
1032
1032
|
return callback(err) ;
|
|
1033
1033
|
}
|
|
1034
1034
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drachtio-srf",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.23",
|
|
4
4
|
"description": "drachtio signaling resource framework",
|
|
5
5
|
"main": "lib/srf.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"debug": "^3.2.7",
|
|
27
27
|
"delegates": "^0.1.0",
|
|
28
|
-
"eslint": "^8.30.0",
|
|
29
|
-
"eslint-plugin-promise": "^6.1.1",
|
|
30
28
|
"node-noop": "^0.0.1",
|
|
31
29
|
"only": "^0.0.2",
|
|
32
|
-
"uuid-random": "^1.3.2",
|
|
33
30
|
"sdp-transform": "^2.14.1",
|
|
34
|
-
"short-uuid": "^4.2.
|
|
31
|
+
"short-uuid": "^4.2.2",
|
|
35
32
|
"sip-methods": "^0.3.0",
|
|
36
33
|
"sip-status": "^0.1.0",
|
|
37
|
-
"utils-merge": "^1.0.0"
|
|
34
|
+
"utils-merge": "^1.0.0",
|
|
35
|
+
"uuid-random": "^1.3.2"
|
|
38
36
|
},
|
|
39
37
|
"devDependencies": {
|
|
40
38
|
"config": "^3.3.7",
|
|
39
|
+
"eslint": "^8.30.0",
|
|
40
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
41
41
|
"mocha": "^9.2.2",
|
|
42
42
|
"nyc": "^15.1.0",
|
|
43
43
|
"should": "^13.2.3",
|