[Server] Fix a crash case when the server stops
[Server] Fix a crash case when the server stops

Signed-off-by: Regis Merlino <bf92b28820f6093e0f55b8f19f2762bc8cee2f98@intel.com>

lferrandis/dleyna-server,em-/dleyna-server,jonte/dleyna-server,rmerlino/dleyna-server,rmerlino/dleyna-server,jku/dleyna-server,lferrandis/dleyna-server,martin-flaska/dleyna-server,martin-flaska/dleyna-server,andhe/dleyna-server,andhe/dleyna-server,rmerlino/dleyna-server,UIKit0/dleyna-server,01org/dleyna-server,martin-flaska/dleyna-server,jonte/dleyna-server,rmerlino/dleyna-server,UIKit0/dleyna-server,01org/dleyna-server,UIKit0/dleyna-server,martin-flaska/dleyna-server,01org/dleyna-server,em-/dleyna-server,jonte/dleyna-server,puleglot/dleyna-server,puleglot/dleyna-server,01org/dleyna-server,andhe/dleyna-server,em-/dleyna-server,jku/dleyna-server,em-/dleyna-server,lferrandis/dleyna-server,puleglot/dleyna-server,andhe/dleyna-server,jku/dleyna-server