fix reference a local variable (#273)
fix reference a local variable (#273)

* fix reference a local variable
* call g_channels.clear() at end of main()

Cherry-pick: 44879bf25ff60187dcaa938a637d6ec50fd8531d

westfly/muduo,westfly/muduo,westfly/muduo