mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-02-20 20:29:02 +00:00
server: http reqs 404 when only ws server is used
This commit is contained in:
parent
0b88a7a552
commit
834bf1db5e
@ -89,6 +89,10 @@ function Server (opts) {
|
||||
if (opts.ws === true) {
|
||||
if (!self.http) {
|
||||
self.http = http.createServer()
|
||||
self.http.on('request', function (req, res) {
|
||||
res.statusCode = 404
|
||||
res.end('404 Not Found')
|
||||
})
|
||||
self.http.on('error', function (err) { self._onError(err) })
|
||||
self.http.on('listening', onListening)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user