@evanp/activitypub-bot 0.41.1 → 0.41.2

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/safeagent.js +10 -1
  2. package/package.json +1 -1
package/lib/safeagent.js CHANGED
@@ -27,7 +27,16 @@ export class SafeAgent extends https.Agent {
27
27
  if (isPrivateIP(address)) {
28
28
  return callback(new PrivateNetworkError(address))
29
29
  }
30
- super.createConnection({ ...options, hostname: address }, callback)
30
+ try {
31
+ const socket = super.createConnection({
32
+ ...options,
33
+ host: address,
34
+ servername: options.servername || options.hostname
35
+ })
36
+ callback(null, socket)
37
+ } catch (e) {
38
+ callback(e)
39
+ }
31
40
  })
32
41
  }
33
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evanp/activitypub-bot",
3
- "version": "0.41.1",
3
+ "version": "0.41.2",
4
4
  "description": "server-side ActivityPub bot framework",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",