mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-02-23 13:49:02 +00:00
Support lazy 'wrtc' module initialization
For: https://github.com/feross/webtorrent-hybrid/issues/46
This commit is contained in:
parent
f21911a509
commit
cb8c324ebe
@ -61,8 +61,12 @@ function Client (opts) {
|
|||||||
self.destroyed = false
|
self.destroyed = false
|
||||||
|
|
||||||
self._rtcConfig = opts.rtcConfig
|
self._rtcConfig = opts.rtcConfig
|
||||||
self._wrtc = opts.wrtc
|
|
||||||
self._getAnnounceOpts = opts.getAnnounceOpts
|
self._getAnnounceOpts = opts.getAnnounceOpts
|
||||||
|
self._wrtc = opts.wrtc
|
||||||
|
|
||||||
|
// Support lazy 'wrtc' module initialization
|
||||||
|
// See: https://github.com/feross/webtorrent-hybrid/issues/46
|
||||||
|
if (typeof self._wrtc === 'function') self._wrtc = self._wrtc()
|
||||||
|
|
||||||
debug('new client %s', self.infoHash)
|
debug('new client %s', self.infoHash)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user