moved monitoring_thread#terminate into socket#close