commit | 4a23bc57051187362094c1f41793901805ac55c2 | [log] [tgz] |
---|---|---|
author | Maxim Dounin <mdounin@mdounin.ru> | Mon Jan 30 11:12:52 2012 +0000 |
committer | Maxim Dounin <mdounin@mdounin.ru> | Mon Jan 30 11:12:52 2012 +0000 |
tree | 812f310b9cb5392d8e593e861fa6696d75ef827d | |
parent | b06200f3dc071a60ceadbfc65577086ba4626cbd [diff] |
Fixed error handling in ngx_event_connect_peer(). Previously if ngx_add_event() failed a connection was freed two times (once in the ngx_event_connect_peer(), and again by a caller) as pc->connection was left set. Fix is to always use ngx_close_connection() to close connection properly and set pc->connection to NULL on errors. Patch by Piotr Sikora.