You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.
// In instances where `close` was not explicitly called,
// such as an iterable stream ending, ensure we have set the close
// timeline
if(maConn.timeline.close==null){
maConn.timeline.close=Date.now()
}
})
. To verify I have locally edited socket-to-conn.js and replaced the .once stuff with this:
functiononclose(){if(stream.socket.onclose===onclose){stream.socket.onclose=null;// only once}if(maConn.timeline.close==null){maConn.timeline.close=Date.now();}}stream.socket.onclose=onclose;
It has the downside of mutating the object so there might be a better solution, but it works.
The text was updated successfully, but these errors were encountered:
I simulated that it's not working by attaching a socket to a conn object that I can manually close. Not sure how to trigger the close socket event without hacking (or without calling close on conn)
resolves#179
Hey, I noticed the socket close handler is not working in the browser
js-libp2p-websockets/src/socket-to-conn.ts
Lines 61 to 68 in ac069d3
.once
stuff with this:It has the downside of mutating the object so there might be a better solution, but it works.
The text was updated successfully, but these errors were encountered: