mirror of
				https://github.com/zeromq/libzmq.git
				synced 2025-10-29 20:59:47 +01:00 
			
		
		
		
	reconnection process fixed when failure occurs during init phase
This commit is contained in:
		| @@ -64,7 +64,8 @@ namespace zmq | |||||||
|                 class own_t *object; |                 class own_t *object; | ||||||
|             } own; |             } own; | ||||||
|  |  | ||||||
|             //  Attach the engine to the session. |             //  Attach the engine to the session. If engine is NULL, it informs | ||||||
|  |             //  session that the connection have failed. | ||||||
|             struct { |             struct { | ||||||
|                 struct i_engine *engine; |                 struct i_engine *engine; | ||||||
|                 unsigned char peer_identity_size; |                 unsigned char peer_identity_size; | ||||||
|   | |||||||
| @@ -178,6 +178,14 @@ void zmq::session_t::finalise () | |||||||
| void zmq::session_t::process_attach (i_engine *engine_, | void zmq::session_t::process_attach (i_engine *engine_, | ||||||
|     const blob_t &peer_identity_) |     const blob_t &peer_identity_) | ||||||
| { | { | ||||||
|  |     //  If some other object (e.g. init) notifies us that the connection failed | ||||||
|  |     //  we need to start the reconnection process. | ||||||
|  |     if (!engine_) { | ||||||
|  |         zmq_assert (!engine); | ||||||
|  |         detached (); | ||||||
|  |         return; | ||||||
|  |     } | ||||||
|  |  | ||||||
|     //  Check whether the required pipes already exist. If not so, we'll |     //  Check whether the required pipes already exist. If not so, we'll | ||||||
|     //  create them and bind them to the socket object. |     //  create them and bind them to the socket object. | ||||||
|     reader_t *socket_reader = NULL; |     reader_t *socket_reader = NULL; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Martin Sustrik
					Martin Sustrik