Skip to content

Commit

Permalink
Return server from server.listen for method chaining to work (#1641)
Browse files Browse the repository at this point in the history
Return server from server.listen for method chaining to work
  • Loading branch information
feross committed Sep 10, 2019
2 parents b25ff45 + b734f68 commit 8602342
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/server.js
Expand Up @@ -19,8 +19,7 @@ function Server (torrent, opts = {}) {
closed = false
server.on('connection', onConnection)
server.on('request', onRequest)
_listen.apply(server, args)
return server
return _listen.apply(server, args)
}

server.close = cb => {
Expand Down

0 comments on commit 8602342

Please sign in to comment.