trunk/src/emu/webengine.c
| r24863 | r24864 | |
| 118 | 118 | for (simple_list_wrapper<mg_connection> *curitem = m_websockets.first(); curitem != NULL; curitem = curitem->next()) |
| 119 | 119 | { |
| 120 | 120 | int status = mg_websocket_write(curitem->object(), WEBSOCKET_OPCODE_PING, NULL, 0); |
| 121 | | if (status==0) m_websockets.remove(*curitem); // remove inactive clients |
| 121 | if (status==0) m_websockets.detach(*curitem); // remove inactive clients |
| 122 | 122 | } |
| 123 | 123 | } |
| 124 | 124 | osd_sleep(osd_ticks_per_second()/5); |
| r24863 | r24864 | |
| 226 | 226 | for (simple_list_wrapper<mg_connection> *curitem = m_websockets.first(); curitem != NULL; curitem = curitem->next()) |
| 227 | 227 | { |
| 228 | 228 | int status = mg_websocket_write(curitem->object(), WEBSOCKET_OPCODE_TEXT, message, strlen(message)); |
| 229 | | if (status==0) m_websockets.remove(*curitem); // remove inactive clients |
| 229 | if (status==0) m_websockets.detach(*curitem); // remove inactive clients |
| 230 | 230 | } |
| 231 | 231 | } |