Update socket-adapter.js