So with my nexus 5 im easily able to do something like this to connect adb over wifi:
adb tcpip 5555
adb connect 192.xxx.x.xx
and then disconne
My research results that it is some bug or unexpected behavior in Android Studio 2.3.1, which kills running adb server (with all open connections) in some situations. In example when you disconnect USB cable or close Android Studio application.
Steps to reproduce: