mirror of
https://github.com/logos-storage/bittorrent-tracker.git
synced 2026-01-03 13:33:08 +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…
x
Reference in New Issue
Block a user