[Vortex] Bug: Wrong error msg when connection refused

Jens Alfke jens at mooseyard.com
Mon Apr 7 20:33:38 CEST 2008


When vortex tries to open a connection but the TCP socket won't open,  
the onConnect handler is called with the misleading error message  
"Received null frame were it was expected initial greetings, finish  
connection id=25". This implies a frame was received, and it doesn't  
indicate that the connection was refused.

The following three critical-level messages are also logged:
	vortex-frame-factory: unable to read a line, error was: Connection  
refused
	vortex-frame-factory: an error have ocurred while reading socket
	vortex-connection: Received null frame were it was expected initial  
greetings, finish connection id=13
The first of these happens in __vortex_frame_readline  
(vortex_frame_factory.c:742). It has the correct error message  
("Connection refused") but this doesn't get propagated to the client.

The error message returned from vortex_connection_get_message() should  
be "Connection refused" in this case. Could this be fixed?
In general, it would be better for Vortex to use error numbers than  
just strings, so that the calling code can tell what error occurred,  
and do something appropriate or at least look up its own error message  
to give the user.

Thanks,

—Jens

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1875 bytes
Desc: not available
Url : http://lists.aspl.es/pipermail/vortex/attachments/20080407/3df90fa8/attachment.bin 


More information about the Vortex mailing list