Skip to content

Commit 6456dd7

Browse files
committed
REFACTOR: public methods are public
1 parent f68ee0e commit 6456dd7

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

client/websocket-tracker.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ const RECONNECT_MAXIMUM = 60 * 60 * 1000
1616
const RECONNECT_VARIANCE = 5 * 60 * 1000
1717
const OFFER_TIMEOUT = 50 * 1000
1818

19-
// const TRICKLE_TIMEOUT = 10 * 1000
20-
// const SDP_TRICKLE_REGEX = /a=ice-options:trickle\s\n/
21-
2219
class WebSocketTracker extends Tracker {
2320
constructor (client, announceUrl, opts) {
2421
super(client, announceUrl)

server/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class Server extends EventEmitter {
159159
return swarm
160160
}
161161

162-
_onRequest (params, cb) {
162+
onRequest (params, cb) {
163163
if (params && params.action === common.ACTIONS.CONNECT) {
164164
cb(null, { action: common.ACTIONS.CONNECT })
165165
} else if (params && params.action === common.ACTIONS.ANNOUNCE) {

server/services/attachHttp/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function attachHttpServer (server, onListening) {
3535
return
3636
}
3737

38-
server._onRequest(params, (err, response) => {
38+
server.onRequest(params, (err, response) => {
3939
if (err) {
4040
server.emit('warning', err)
4141
response = {

server/services/attachWS/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function setupWebSocketServer (server) {
7171

7272
if (!socket.peerId) socket.peerId = params.peer_id // as hex
7373

74-
server._onRequest(params, (err, response) => {
74+
server.onRequest(params, (err, response) => {
7575
if (server.destroyed || socket.destroyed) return
7676
if (err) {
7777
socket.send(

0 commit comments

Comments
 (0)