@babblevoice/projectrtp 2.4.11 → 2.4.12

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.
Files changed (2) hide show
  1. package/lib/server.js +7 -2
  2. package/package.json +1 -1
package/lib/server.js CHANGED
@@ -244,6 +244,11 @@ class channel {
244
244
  if ( receivedmsg.id === chnl.id ) chnl._on( receivedmsg )
245
245
  }
246
246
 
247
+ /* correct the instance id - i.e. in a proxy enviroment (docker swarm) instance may differ */
248
+ if( receivedmsg && receivedmsg.status && receivedmsg.status.instance ) {
249
+ newchannel.connection.instance = receivedmsg.status.instance
250
+ }
251
+
247
252
  if ( openresolve ) openresolve( newchannel )
248
253
  } )
249
254
  } )
@@ -272,7 +277,7 @@ class channel {
272
277
 
273
278
  options.channel = "open"
274
279
 
275
- const resolvepromise = new Promise( ( res ) => {
280
+ const resolvepromise = new Promise( ( resolve ) => {
276
281
 
277
282
  const newchannel = new channel()
278
283
  if( cb ) newchannel.em.on( "all", cb )
@@ -280,7 +285,7 @@ class channel {
280
285
  newchannel.connection = this.connection
281
286
  newchannel.channels = this.channels
282
287
  newchannel.channels.push( newchannel )
283
- newchannel.openresolve = res
288
+ newchannel.openresolve = resolve
284
289
  newchannel._write( options )
285
290
  } )
286
291
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babblevoice/projectrtp",
3
- "version": "2.4.11",
3
+ "version": "2.4.12",
4
4
  "description": "A scalable Node addon RTP server",
5
5
  "main": "index.js",
6
6
  "directories": {