Create sbot connection for every query #16

Closed
notplants wants to merge 2 commits from sbot-connection into get-about-info
Owner

Unfortunately I don't understand the RPC reader code well enough (yet) to say exactly why this fixes the issue, but in the interest of pragmatism, this code does fix the issue.

The issue was:

  • calling publish after creating a stream creates the error Application error: SSB RPC failure: i/o

In this PR, I change publish to create its own sbot_connection, instead of using the sbot_connection created during sbot initialization.

Since we are now creating a new sbot_connection for each query, I removed sbot_connection as a field of Sbot.

This may have some overhead, but for all I know its negligible, and still seems to run instantly to me.

Someday would be curious to understand kuska better and exactly how it creates these connections, and why creating a new connection (via stream) seems to have interfered with the old previously created connection.

But maybe this is working for now.

Unfortunately I don't understand the RPC reader code well enough (yet) to say exactly why this fixes the issue, but in the interest of pragmatism, this code does fix the issue. The issue was: - calling publish after creating a stream creates the error `Application error: SSB RPC failure: i/o` In this PR, I change publish to create its own sbot_connection, instead of using the sbot_connection created during sbot initialization. Since we are now creating a new sbot_connection for each query, I removed sbot_connection as a field of Sbot. This may have some overhead, but for all I know its negligible, and still seems to run instantly to me. Someday would be curious to understand kuska better and exactly how it creates these connections, and why creating a new connection (via stream) seems to have interfered with the old previously created connection. But maybe this is working for now.
notplants added 3 commits 2022-01-14 17:45:38 +00:00
notplants changed target branch from main to get-about-info 2022-01-14 17:46:05 +00:00
glyph closed this pull request 2022-01-18 09:11:44 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: golgi-ssb/golgi#16
No description provided.