Unable to disconnect network on a device when working with 2 devices

I am facing a new problem when using appium for two devices,
i have created two drivers
driver1 for device1 and driver 2 for device 2 when i disconnect network on device 1 using setNetworkConnection my device 2 automatically disconnected , causes session not found exception.
How to deal wth it???

This sounds like a bug. Please post your question and an appium log on the Appium GitHub site. https://github.com/appium/appium