Losing wifi crashes appium

I’m working on automation for a system update testcase.
Trying to get the automation to handle network loss but kept running into appium errors.

Finally I tried cutting the wifi in a part of the script that has nothing to do with network. Cutting the wifi crashes appium every time at wherever in the script it is.

Finally log messages look like:
2016-03-03 19:51:57:536 - [AndroidBootstrap] [BOOTSTRAP LOG] [error] Error processing data to/from socket (java.net.SocketException: sendto failed: ECONNRESET (Connection reset by peer))
2016-03-03 19:51:57:551 - [debug] [UiAutomator] Moving to state ‘stopped’
Error: write EPIPE
at exports._errnoException (util.js:856:11)
at WriteWrap.afterWrite (net.js:767:14)

Can you please file issue for this issue with as much details possible ?