Skip to content

Commit f6531f5

Browse files
authored
Fix onclose handling (#14)
1 parent 7bf2d38 commit f6531f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/websocket/futures.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl WebSocket {
139139
}) as Box<dyn FnMut(web_sys::CloseEvent)>)
140140
};
141141

142-
ws.set_onerror(Some(close_callback.as_ref().unchecked_ref()));
142+
ws.set_onclose(Some(close_callback.as_ref().unchecked_ref()));
143143

144144
Ok(Self {
145145
ws,

0 commit comments

Comments
 (0)