Skip to content

Commit 051aa50

Browse files
committed
FIX: close http server on close method
1 parent 7702142 commit 051aa50

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ class Server extends EventEmitter {
143143
this.ws
144144
].forEach(closeService)
145145

146-
if (cb) cb(null);
146+
if (this.http) this.http.close(cb)
147+
else cb(null)
147148
}
148149

149150
async createSwarm(infoHash) {

0 commit comments

Comments
 (0)