Closed Powersource closed 1 year ago
asked @staltz about the automatic disconnects
There could be many reasons why the disconnect is happening Try to use
debug
to figure out Repl scheduler doesn't connect nor disconnect. ssb-conn does, but it only disconnects if there are too many connections
Tried debug but the connection stuff doesn't log a ton (note to self that it isn't prefixed by ssb:). Replication scheduler does mention that it'd be nice if conn was installed, I'll try that even if I guess it shouldn't help.
Using ssb.conn.connect
now I just get
ssb:conn-hub connecting to net:localhost:54704~shs:eK7TvrMtKOFkbn44NxVTri+btIbeQpoBHNLZavrYGmo= +0ms
ssb:conn-hub connected to net:localhost:54704~shs:eK7TvrMtKOFkbn44NxVTri+btIbeQpoBHNLZavrYGmo= +29ms
ssb:conn-hub disconnected from net:localhost:54704~shs:eK7TvrMtKOFkbn44NxVTri+btIbeQpoBHNLZavrYGmo= +6s
so not super informative
Added a list of current connections so that should at least make the user feel less confused
ssb:conn-hub disconnected from net:localhost:54704~shs:eK7TvrMtKOFkbn44NxVTri+btIbeQpoBHNLZavrYGmo= +6s
You could try to add a console.trace()
to the conn-hub disconnect logic, to figure out who is calling this disconnect, and why.
Ha, found something!
"muxrpc:psc encoded" has this error:
"Error: unexpected end of parent stream
at PacketStream.destroy (/home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/packet-stream@2.0.6/node_modules/packet-stream/index.js:64:7)
at PacketStream.write (/home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/packet-stream@2.0.6/node_modules/packet-stream/index.js:126:41)
at /home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/muxrpc@6.7.3/node_modules/muxrpc/pull-weird.js:74:17
at /home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/pull-stream@3.7.0/node_modules/pull-stream/sinks/drain.js:26:24
at /home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/pull-stream@3.7.0/node_modules/pull-stream/throughs/filter.js:17:11
at Object.pscDecodeHead [as cb] (/home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/packet-stream-codec@1.2.0/node_modules/packet-stream-codec/index.js:94:25)
at drain (/home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/pull-reader@1.3.1/node_modules/pull-reader/index.js:46:23)
at /home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/pull-reader@1.3.1/node_modules/pull-reader/index.js:63:18
at /home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/pull-abortable@4.1.1/node_modules/pull-abortable/index.js:43:11
at /home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/pull-stream@3.7.0/node_modules/pull-stream/throughs/through.js:19:9"
Not sure what to do with that though. Maybe not worth spending time on.
I'd say demo is done enough now actually
André found a way to fix longer connections! f64560965e128b7911140f2f3f8170570800b41f
Fixed one of the issues, the demo is definitely good enough now