How does autobahn android send a "close" message to the server when app is closed?


I noticed that Autobahn Android sends a “close” message to the server whenever I swipe out the app from the recent tasks screen. How have they implemented this behaviour? Shouldn’t
android kill the activity and the worker threads after swiping out the app from recent apps screen?