shiyilei / protobuf-c

Automatically exported from code.google.com/p/protobuf-c
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

On socket error client file descriptor is closed twice #82

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create RPC client, do not run RPC server.
2. Call protobuf_c_dispatch_run() multiple times.
3. On socket error handle_client_fd_connect_events() is called, 
fd_errno==ECONNREFUSED.
4. handle_client_fd_connect_events() calls protobuf_c_dispatch_close_fd() that 
closes client->fd.
5. handle_client_fd_connect_events() calls client_failed() that calls 
protobuf_c_dispatch_close_fd() again.

What is the expected output? What do you see instead?
I think protobuf_c_dispatch_close_fd() is needless in 
handle_client_fd_connect_events(), it is anyway called from within 
client_failed()

What version of the product are you using? On what operating system?
protobuf-c-0.15, Ubuntu Server

Please provide any additional information below.

Original issue reported on code.google.com by l...@zadarastorage.com on 7 May 2012 at 7:36