Connection failover doesn't work with non-blocking connect

Bug #691163 reported by Al Riddoch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cyphesis
Invalid
Undecided
Erik Ogenvik

Bug Description

skstream supports two features when making outgoing connections.

1) Non blocking connect
2) Trying each address in turn when getaddrinfo returns multiple results.

skstream supports the two together by implementing stepping over the address list in the isReady() method. This does not interact well with cyphesis socket infrastructure. The poll loop has to detect when the connection fails, and in this case HUP is returned by epoll, causing the socket to be removed and deleted.

To work cyphesis will have to inform the socket object that it got HUP, so it can call isReady() iterating to the next address. Cyphesis will also need to allow the socket to add the new fd, as the old one is implicitly replaced.

Revision history for this message
Al Riddoch (alriddoch) wrote :

It may be easier to solve this problem if we don't initially ask for HUP events on connecting sockets, just read().

Revision history for this message
Erik Ogenvik (erik-ogenvik) wrote :

Since we're not using skstream anymore I'm marking this as invalid.

Changed in cyphesis:
assignee: nobody → Erik Ogenvik (erik-ogenvik)
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.