Fix a memory leak with the chat aspect. (#23)
Essentially, the for loop wasn't being returned out of and that caused the read listener to never be let up and released to the gc
This commit is contained in:
@@ -66,9 +66,9 @@ function setupWebsocket() {
|
||||
|
||||
// Uncomment to point to somewhere other than goth.land
|
||||
const protocol = location.protocol == "https:" ? "wss" : "ws"
|
||||
// var ws = new WebSocket(protocol + "://" + location.host + "/entry")
|
||||
var ws = new WebSocket(protocol + "://" + location.host + "/entry")
|
||||
|
||||
var ws = new WebSocket("wss://goth.land/entry")
|
||||
// var ws = new WebSocket("wss://goth.land/entry")
|
||||
|
||||
ws.onmessage = (e) => {
|
||||
const model = JSON.parse(e.data)
|
||||
|
||||
Reference in New Issue
Block a user