summaryrefslogtreecommitdiffstats
path: root/ppapi/shared_impl
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/shared_impl')
-rw-r--r--ppapi/shared_impl/ppb_audio_shared.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/ppapi/shared_impl/ppb_audio_shared.cc b/ppapi/shared_impl/ppb_audio_shared.cc
index 5cf3002..d131bb3 100644
--- a/ppapi/shared_impl/ppb_audio_shared.cc
+++ b/ppapi/shared_impl/ppb_audio_shared.cc
@@ -29,6 +29,9 @@ PPB_Audio_Shared::PPB_Audio_Shared()
}
PPB_Audio_Shared::~PPB_Audio_Shared() {
+ // Shut down the socket to escape any hanging |Receive|s.
+ if (socket_.get())
+ socket_->Shutdown();
StopThread();
}
@@ -105,10 +108,7 @@ void PPB_Audio_Shared::StartThread() {
}
void PPB_Audio_Shared::StopThread() {
- // Shut down the socket to escape any hanging |Receive|s.
- if (socket_.get())
- socket_->Shutdown();
- #if !defined(OS_NACL)
+#if !defined(OS_NACL)
if (audio_thread_.get()) {
audio_thread_->Join();
audio_thread_.reset();