API clientStatus bug #1383

Closed
opened 2018-11-01 11:42:32 +01:00 by PeterSurda · 1 comment
PeterSurda commented 2018-11-01 11:42:32 +01:00 (Migrated from github.com)

came over BM. I haven't tested it, just crosspasting


In their infinite wisdom the devs have decided on the following logic:
If currently connected networkStatus is 'notConnected'
If not currently connected and have not received any incoming connections. networkStatus is "connectedButHaveNotReceivedIncomingConnections"
Otherwise networkStatus is "connectedAndReceivingIncomingConnections"


Hmm well for me it's been working fine until just recently.


in --curses it never worked even be4


I've been running a headless BM instance for a while and I use the api.clientStatus call to monitor it. I noticed that the networkStatus field says "notConnected" when it's connected and receiving incoming connections.
I don't know if this was today's pull or the one before that introduced it.

**came over BM. I haven't tested it, just crosspasting** ------------------------------------------------------ In their infinite wisdom the devs have decided on the following logic: If currently connected networkStatus is 'notConnected' If not currently connected and have not received any incoming connections. networkStatus is "connectedButHaveNotReceivedIncomingConnections" Otherwise networkStatus is "connectedAndReceivingIncomingConnections" ------------------------------------------------------- Hmm well for me it's been working fine until just recently. ------------------------------------------------------ in --curses it never worked even be4 ------------------------------------------------------ I've been running a headless BM instance for a while and I use the api.clientStatus call to monitor it. I noticed that the networkStatus field says "notConnected" when it's connected and receiving incoming connections. I don't know if this was today's pull or the one before that introduced it.
g1itch commented 2018-11-01 14:03:34 +01:00 (Migrated from github.com)

Yes, it looks strange. Introduced in 7ed459b.
Previous edition was:

if len(network.stats.connectedHostsList()) == 0:
    networkStatus = 'notConnected'
Yes, it [looks strange](../blob/v0.6/src/api.py#L1331). Introduced in 7ed459b. Previous edition was: ```python if len(network.stats.connectedHostsList()) == 0: networkStatus = 'notConnected' ```
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
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: Bitmessage/PyBitmessage-2024-12-04#1383
No description provided.