Pass server object as second argument in error emit
Add error parameter to Channel.close method